Author: quozl Date: Fri Sep 5 03:33:53 2014 New Revision: 3740 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3740
Log: [ARM] fixed signed double comparison Author: Matthijs van Duin matthijs@rinnic-vaude.nl Date: Sat Apr 26 06:10:31 2014 +0200
Signed 64-bit comparisons currently check the sign of the difference of the arguments, which really isn't the same as a comparison of the arguments. And a small simplification of d-
Modified: cpu/arm/kerncode.fth
Modified: cpu/arm/kerncode.fth ============================================================================== --- cpu/arm/kerncode.fth Fri Sep 5 03:31:13 2014 (r3739) +++ cpu/arm/kerncode.fth Fri Sep 5 03:33:53 2014 (r3740) @@ -802,34 +802,37 @@
code d- ( d1 d2 -- d1-d2 ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2 - subs r2,r2,r0 - sbc r1,r1,tos - psh r2,sp - mov tos,r1 + subs r0,r2,r0 + sbc tos,r1,tos + psh r0,sp c; code d< ( d1 d2 -- f ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2 subs r2,r2,r0 - sbcs tos,r1,tos - mov tos,tos,asr #0 + sbcs r1,r1,tos + movge tos,#0 + mvnlt tos,#0 c; code d>= ( d1 d2 -- f ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2 subs r2,r2,r0 - sbcs tos,r1,tos - mvn tos,tos,asr #0 + sbcs r1,r1,tos + movlt tos,#0 + mvnge tos,#0 c; code d> ( d1 d2 -- f ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2 - subs r0,r0,r2 - sbcs tos,tos,r1 - mov tos,tos,asr #0 + subs r2,r2,r0 + sbcs r1,r1,tos + movle tos,#0 + mvngt tos,#0 c; code d<= ( d1 d2 -- f ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2 - subs r0,r0,r2 - sbcs tos,tos,r1 - mvn tos,tos,asr #0 + subs r2,r2,r0 + sbcs tos,r1,tos + movgt tos,#0 + mvnle tos,#0 c; code du< ( d1 d2 -- f ) ldmia sp!,{r0,r1,r2} \ tos r0 r1 r2
openfirmware@openfirmware.info