flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
revolution
You can't have unsigned 64bit values above 0x7fffffff in an imm32 value. This is not an error, there is no way to encode such values in the x86-64 instruction set.
|
|||
![]() |
|
MazeGen
In other words, opcode 480500000080 means ADD RAX, 0FFFFFFFF80000000h, it is not ADD RAX, (00000000)80000000h.
|
|||
![]() |
|
Helle
Hmm, but the CPU accept this e.g.:
Code: mov rax,0 dw 0548h dd 0D0000000h ;ADD RAX,0D000000h The result is FFFFFFFFD0000000h, like expected. With the restriction I never get the sign-extension. Thanks! Helle |
|||
![]() |
|
LocoDelAssembly
What about:
Code: xor eax, eax ; 31 C0 add rax, -30000000h ; 48 05 00 00 00 D0 |
|||
![]() |
|
Tomasz Grysztar
Or:
Code: add rax, 0FFFFFFFFD0000000h ![]() |
|||
![]() |
|
Helle
Hello,
you are right. It´s for a disassembler-project and I make tests with udis86; this shows ADD RAX,0xD0000000h. I will use your Code, it´s better for eyes and brain ![]() Solved, sorry and thanks! Helle |
|||
![]() |
|
LocoDelAssembly
Tomasz Grysztar wrote: Or: Because I think that one should also say "value out of range" (also for "alpha = 0FFFFFFFFD0000000h"). ![]() Reason: Code: add rax, 0FFFFFFFFD0000000h / 10000h ; add rax, -3000h add eax, 0FFFFD000h / 10000h ; add eax, 0FFFFh add rax, 18446744072904245248 / 65536 ; add rax, -3000h |
|||
![]() |
|
revolution
See here also.
|
|||
![]() |
|
Tomasz Grysztar
LocoDelAssembly wrote:
|
|||
![]() |
|
LocoDelAssembly
Quote:
Does TFM say that? ![]() But yet, it would be better not do that way as if you decide in the future to extend to 128-bit internal precision (or even arbitrary), you'll be forced to break backward compatibility. |
|||
![]() |
|
revolution
LocoDelAssembly: 128bit!? Do you think that CPUs will have 128bit arithmetic any time soon? SSE/AVX use 64bit operations.
|
|||
![]() |
|
LocoDelAssembly
Quote:
Absolutely: Code: mov ecx, 7 div rcx ; 128-bit dividend |
|||
![]() |
|
revolution
LocoDelAssembly wrote: Absolutely: |
|||
![]() |
|
Tomasz Grysztar
LocoDelAssembly wrote: But yet, it would be better not do that way as if you decide in the future to extend to 128-bit internal precision (or even arbitrary), you'll be forced to break backward compatibility. This cannot be done with fasm 1.x architecture. And the fasm 2 is going to be incompatible with 1.x anyway, so it's not a big deal. ![]() |
|||
![]() |
|
comrade
Is FASM2 going to be coded in asm? Or in something sane?
![]() |
|||
![]() |
|
r22
FASM2 should have javascript macros.
That would be fun. comrade is right! FASM2 should be created in a HEX EDITOR Tomasz has got it way too easy with his mnemonics for machine code ![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.