[cfe-dev] Update lib/Target/ARM/README.txt

John Tytgat John.Tytgat at aaug.net
Mon Feb 8 15:04:17 PST 2010


One of the lib/Target/ARM/README.txt items can be removed as this is
currently the output I get:

	.globl	my_abs
	.align	2
	.type my_abs,%function
my_abs:
	add	r1, r0, r0, asr #31
	eor	r0, r1, r0, asr #31
	bx	lr
	.size	my_abs, .-my_abs

John.
-- 
John Tytgat, in his comfy chair at home
John.Tytgat at aaug.net
-------------- next part --------------
Index: lib/Target/ARM/README.txt
===================================================================
--- lib/Target/ARM/README.txt	(revision 95517)
+++ lib/Target/ARM/README.txt	(working copy)
@@ -71,26 +71,6 @@
 
 //===---------------------------------------------------------------------===//
 
-We currently compile abs:
-int foo(int p) { return p < 0 ? -p : p; }
-
-into:
-
-_foo:
-        rsb r1, r0, #0
-        cmn r0, #1
-        movgt r1, r0
-        mov r0, r1
-        bx lr
-
-This is very, uh, literal.  This could be a 3 operation sequence:
-  t = (p sra 31); 
-  res = (p xor t)-t
-
-Which would be better.  This occurs in png decode.
-
-//===---------------------------------------------------------------------===//
-
 More load / store optimizations:
 1) Better representation for block transfer? This is from Olden/power:
 


More information about the cfe-dev mailing list