64 bit assembler > UASM Assembler Development

Operand size bug

(1/1)

Biterider:
Hi John
Compiling the following instruction, I noticed some strange behavior in 64-bit


--- Code: ---test rax, 800000000000000h   => Error A2237: Constant value too large: 800000000000000h
test rax, 8000000000000000h  => compiles fine but to    test rax, 0
test rax, 80000000000000000h  => Error A2237: Constant value too large: 80000000000000000h

--- End code ---

Uasm Version 2.55

Biterider

tenkey:
More examples:


--- Code: ---UASM v2.55, Mar 29 2022, Masm-compatible assembler.

testproject.asm
                                .code
00000000  48A900000000          test rax, -4000000000000000h
00000006  48A900000000          test rax,  8000000000000000h
0000000C  48A900000000          test rax, 0fff0000000000000h
                                end

--- End code ---

This is wrong. All of them ought to say "Constant value too large".

jj2007:

--- Code: ---  int 3
  mov rax, 8000000000000000h ; ok
  test rax, 8000000000000000h ; ok? not really...
;   test rax, 800000000000000h ; not ok
;   test rax, 80000000000000h
;   test rax, 8000000000000h
;   test rax, 800000000000h
;   test rax, 80000000000h
;   test rax, 8000000000h
;   test rax, 800000000h
  test rax, 80000000h
  test rax, 8000000h
--- End code ---


--- Code: --- CC                        | int3                     |
 48:B8 0000000000000080    | mov rax,8000000000000000 |
 48:A9 00000000            | test rax,0               |
 48:A9 00000080            | test rax,FFFFFFFF8000000 |
 48:A9 00000008            | test rax,8000000         |

--- End code ---

johnsa:
I've noted this on the github issues list for resolution in 2.56 :)

Navigation

[0] Message Index

Go to full version