lkml.org 
[lkml]   [2011]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 03/36] Hexagon: Add bitops support
Hi!

> + __asm__ __volatile__ (
> + " {R10 = %1; R11 = asr(%2,#5); }\n"
> + " {R10 += asl(R11,#2); R11 = and(%2,#0x1f)}\n"
> + "1: R12 = memw_locked(R10);\n"
> + " { P0 = tstbit(R12,R11); R12 = clrbit(R12,R11); }\n"
> + " memw_locked(R10,P1) = R12;\n"
> + " {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n"

Nice assembly syntax, btw. I can only wish architectures such as arm
used something as readable...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2011-08-26 22:37    [W:0.236 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site