flat assembler
Message board for the users of flat assembler.
Index
> Main > the final weeks of fasm 1.67 Goto page Previous 1, 2 |
Author |
|
revolution 28 Apr 2009, 14:49
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.
|
|||
28 Apr 2009, 14:49 |
|
MazeGen 28 Apr 2009, 15:22
In other words, opcode 480500000080 means ADD RAX, 0FFFFFFFF80000000h, it is not ADD RAX, (00000000)80000000h.
|
|||
28 Apr 2009, 15:22 |
|
Helle 28 Apr 2009, 19:25
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 |
|||
28 Apr 2009, 19:25 |
|
LocoDelAssembly 28 Apr 2009, 21:04
What about:
Code: xor eax, eax ; 31 C0 add rax, -30000000h ; 48 05 00 00 00 D0 |
|||
28 Apr 2009, 21:04 |
|
Tomasz Grysztar 29 Apr 2009, 06:15
Or:
Code: add rax, 0FFFFFFFFD0000000h |
|||
29 Apr 2009, 06:15 |
|
Helle 29 Apr 2009, 09:35
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 |
|||
29 Apr 2009, 09:35 |
|
LocoDelAssembly 29 Apr 2009, 14:23
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 |
|||
29 Apr 2009, 14:23 |
|
revolution 29 Apr 2009, 15:16
See here also.
|
|||
29 Apr 2009, 15:16 |
|
Tomasz Grysztar 29 Apr 2009, 16:32
LocoDelAssembly wrote:
|
|||
29 Apr 2009, 16:32 |
|
LocoDelAssembly 29 Apr 2009, 18:22
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. |
|||
29 Apr 2009, 18:22 |
|
revolution 29 Apr 2009, 18:26
LocoDelAssembly: 128bit!? Do you think that CPUs will have 128bit arithmetic any time soon? SSE/AVX use 64bit operations.
|
|||
29 Apr 2009, 18:26 |
|
LocoDelAssembly 29 Apr 2009, 18:34
Quote:
Absolutely: Code: mov ecx, 7 div rcx ; 128-bit dividend |
|||
29 Apr 2009, 18:34 |
|
revolution 29 Apr 2009, 18:45
LocoDelAssembly wrote: Absolutely: |
|||
29 Apr 2009, 18:45 |
|
Tomasz Grysztar 29 Apr 2009, 20:39
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. |
|||
29 Apr 2009, 20:39 |
|
comrade 30 Apr 2009, 03:27
Is FASM2 going to be coded in asm? Or in something sane?
|
|||
30 Apr 2009, 03:27 |
|
r22 30 Apr 2009, 20:55
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 |
|||
30 Apr 2009, 20:55 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.