Hi Saleem,

I don't think these are quite right yet...

================
Comment at: lib/Headers/arm_acle.h:116
@@ +115,3 @@
+  __asm__ __volatile__("mrs %0, cpsr" : "=r"(cpsr));
+  return cpsr & 0x08000000;
+}
----------------
I think ACLE says this function should return 1 when the flag is set.

================
Comment at: lib/Headers/arm_acle.h:121
@@ +120,3 @@
+__set_saturation_occurred(int occurred) {
+  __asm__ __volatile__ ("msr cpsr_q, %0" : : "r" (occurred));
+}
----------------
This also doesn't seem to do what ACLE says: set the Q flag based on the LSB of 
the input.

Also, I don't think "cpsr_q" exists, does it? Both the v7A and v7M descriptions 
I've found lump it in with NZCV (i.e. "cpsr_nzcvq"). Which probably means the 
assembly should be marked as clobbering CPSR too.

http://reviews.llvm.org/D6107



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to