commit fb71bebdd1c0c1f1a0efbff704dd58e3b775280f
parent da572829ddd668eb2d5f6e2aee36186d79a25d0d
Author: Alexander Burger <abu@software-lab.de>
Date: Fri, 29 Apr 2011 11:59:18 +0200
ppc64 bug in 'test' instruction
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/doc64/asm b/doc64/asm
@@ -1,4 +1,4 @@
-# 25apr11abu
+# 29apr11abu
# (c) Software Lab. Alexander Burger
@@ -113,7 +113,7 @@
or dst src # Bitwise OR 'dst' with 'src'
xor dst src # Bitwise XOR 'dst' with 'src'
off dst src # Clear 'src' bits in 'dst'
- test dst src # Bit-test 'dst' with 'src'
+ test dst src # Bit-test 'dst' with 'src' [z._]
shl dst src # Shift 'dst' left into Carry by 'src' bits
shr dst src # Shift 'dst' right into Carry by 'src' bits
diff --git a/src64/arch/ppc64.l b/src64/arch/ppc64.l
@@ -1,4 +1,4 @@
-# 28apr11abu
+# 29apr11abu
# (c) Software Lab. Alexander Burger
# Byte order
@@ -688,6 +688,7 @@
(regDst A) ) )
(asm test (Dst D Src S)
+ (prinst "li" 31 -2) # Clear carry
(if (and (=0 S) (>= 65535 (format Src) 0))
(let A (dstReg Dst D)
(prinst "andi." 0 (cadr A) (format Src)) )