diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-09-26 17:00:18 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-09-26 17:00:18 -0700 |
commit | 3f9bc94b6e9cefdf43adcbf45cbd3c93d30a5f45 (patch) | |
tree | 04444095463aefbe339f8fb8a5c24bcd76e13f5b | |
parent | 413fb900bf1199eb842d788cc81045ed546b5247 (diff) | |
download | nasm-3f9bc94b6e9cefdf43adcbf45cbd3c93d30a5f45.tar.gz nasm-3f9bc94b6e9cefdf43adcbf45cbd3c93d30a5f45.tar.bz2 nasm-3f9bc94b6e9cefdf43adcbf45cbd3c93d30a5f45.zip |
Test for various addressing modes in 64-bit mode
Test of various addressing modes in 64-bit mode. Relative addresses
specified as numbers are currently broken!!
-rw-r--r-- | test/riprel.asm | 652 | ||||
-rw-r--r-- | test/riprel.pl | 23 |
2 files changed, 601 insertions, 74 deletions
diff --git a/test/riprel.asm b/test/riprel.asm index 3e4e6a3..c9e9121 100644 --- a/test/riprel.asm +++ b/test/riprel.asm @@ -1,99 +1,603 @@ bits 64 default abs - + + mov al,[foo] + mov bl,[foo] + mov ax,[foo] + mov bx,[foo] + mov eax,[foo] + mov ebx,[foo] mov rax,[foo] - mov rax,[123456789abcdef0h] mov rbx,[foo] + mov al,[0xaaaaaaaaaaaaaaaa] + mov bl,[0xaaaaaaaaaaaaaaaa] + mov ax,[0xaaaaaaaaaaaaaaaa] + mov bx,[0xaaaaaaaaaaaaaaaa] + mov eax,[0xaaaaaaaaaaaaaaaa] + mov ebx,[0xaaaaaaaaaaaaaaaa] + mov rax,[0xaaaaaaaaaaaaaaaa] + mov rbx,[0xaaaaaaaaaaaaaaaa] + mov al,[0xbbbbbbbb] + mov bl,[0xbbbbbbbb] + mov ax,[0xbbbbbbbb] + mov bx,[0xbbbbbbbb] + mov eax,[0xbbbbbbbb] + mov ebx,[0xbbbbbbbb] + mov rax,[0xbbbbbbbb] + mov rbx,[0xbbbbbbbb] + mov al,[0xffffffffcccccccc] + mov bl,[0xffffffffcccccccc] + mov ax,[0xffffffffcccccccc] + mov bx,[0xffffffffcccccccc] + mov eax,[0xffffffffcccccccc] + mov ebx,[0xffffffffcccccccc] + mov rax,[0xffffffffcccccccc] + mov rbx,[0xffffffffcccccccc] + + mov al,[dword foo] + mov bl,[dword foo] + mov ax,[dword foo] + mov bx,[dword foo] + mov eax,[dword foo] + mov ebx,[dword foo] mov rax,[dword foo] mov rbx,[dword foo] + mov al,[dword 0xaaaaaaaaaaaaaaaa] + mov bl,[dword 0xaaaaaaaaaaaaaaaa] + mov ax,[dword 0xaaaaaaaaaaaaaaaa] + mov bx,[dword 0xaaaaaaaaaaaaaaaa] + mov eax,[dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[dword 0xaaaaaaaaaaaaaaaa] + mov rax,[dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[dword 0xaaaaaaaaaaaaaaaa] + mov al,[dword 0xbbbbbbbb] + mov bl,[dword 0xbbbbbbbb] + mov ax,[dword 0xbbbbbbbb] + mov bx,[dword 0xbbbbbbbb] + mov eax,[dword 0xbbbbbbbb] + mov ebx,[dword 0xbbbbbbbb] + mov rax,[dword 0xbbbbbbbb] + mov rbx,[dword 0xbbbbbbbb] + mov al,[dword 0xffffffffcccccccc] + mov bl,[dword 0xffffffffcccccccc] + mov ax,[dword 0xffffffffcccccccc] + mov bx,[dword 0xffffffffcccccccc] + mov eax,[dword 0xffffffffcccccccc] + mov ebx,[dword 0xffffffffcccccccc] + mov rax,[dword 0xffffffffcccccccc] + mov rbx,[dword 0xffffffffcccccccc] + + mov al,[qword foo] + mov bl,[qword foo] + mov ax,[qword foo] + mov bx,[qword foo] + mov eax,[qword foo] + mov ebx,[qword foo] mov rax,[qword foo] - mov rax,[rel foo] - mov rbx,[rel foo] - mov rax,[rel dword foo] - mov rax,[rel qword foo] + mov rbx,[qword foo] + mov al,[qword 0xaaaaaaaaaaaaaaaa] + mov bl,[qword 0xaaaaaaaaaaaaaaaa] + mov ax,[qword 0xaaaaaaaaaaaaaaaa] + mov bx,[qword 0xaaaaaaaaaaaaaaaa] + mov eax,[qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[qword 0xaaaaaaaaaaaaaaaa] + mov rax,[qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[qword 0xaaaaaaaaaaaaaaaa] + mov al,[qword 0xbbbbbbbb] + mov bl,[qword 0xbbbbbbbb] + mov ax,[qword 0xbbbbbbbb] + mov bx,[qword 0xbbbbbbbb] + mov eax,[qword 0xbbbbbbbb] + mov ebx,[qword 0xbbbbbbbb] + mov rax,[qword 0xbbbbbbbb] + mov rbx,[qword 0xbbbbbbbb] + mov al,[qword 0xffffffffcccccccc] + mov bl,[qword 0xffffffffcccccccc] + mov ax,[qword 0xffffffffcccccccc] + mov bx,[qword 0xffffffffcccccccc] + mov eax,[qword 0xffffffffcccccccc] + mov ebx,[qword 0xffffffffcccccccc] + mov rax,[qword 0xffffffffcccccccc] + mov rbx,[qword 0xffffffffcccccccc] + + mov al,[abs foo] + mov bl,[abs foo] + mov ax,[abs foo] + mov bx,[abs foo] + mov eax,[abs foo] + mov ebx,[abs foo] mov rax,[abs foo] mov rbx,[abs foo] + mov al,[abs 0xaaaaaaaaaaaaaaaa] + mov bl,[abs 0xaaaaaaaaaaaaaaaa] + mov ax,[abs 0xaaaaaaaaaaaaaaaa] + mov bx,[abs 0xaaaaaaaaaaaaaaaa] + mov eax,[abs 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs 0xaaaaaaaaaaaaaaaa] + mov rax,[abs 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs 0xaaaaaaaaaaaaaaaa] + mov al,[abs 0xbbbbbbbb] + mov bl,[abs 0xbbbbbbbb] + mov ax,[abs 0xbbbbbbbb] + mov bx,[abs 0xbbbbbbbb] + mov eax,[abs 0xbbbbbbbb] + mov ebx,[abs 0xbbbbbbbb] + mov rax,[abs 0xbbbbbbbb] + mov rbx,[abs 0xbbbbbbbb] + mov al,[abs 0xffffffffcccccccc] + mov bl,[abs 0xffffffffcccccccc] + mov ax,[abs 0xffffffffcccccccc] + mov bx,[abs 0xffffffffcccccccc] + mov eax,[abs 0xffffffffcccccccc] + mov ebx,[abs 0xffffffffcccccccc] + mov rax,[abs 0xffffffffcccccccc] + mov rbx,[abs 0xffffffffcccccccc] + + mov al,[abs dword foo] + mov bl,[abs dword foo] + mov ax,[abs dword foo] + mov bx,[abs dword foo] + mov eax,[abs dword foo] + mov ebx,[abs dword foo] mov rax,[abs dword foo] + mov rbx,[abs dword foo] + mov al,[abs dword 0xaaaaaaaaaaaaaaaa] + mov bl,[abs dword 0xaaaaaaaaaaaaaaaa] + mov ax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov bx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov eax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov rax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov al,[abs dword 0xbbbbbbbb] + mov bl,[abs dword 0xbbbbbbbb] + mov ax,[abs dword 0xbbbbbbbb] + mov bx,[abs dword 0xbbbbbbbb] + mov eax,[abs dword 0xbbbbbbbb] + mov ebx,[abs dword 0xbbbbbbbb] + mov rax,[abs dword 0xbbbbbbbb] + mov rbx,[abs dword 0xbbbbbbbb] + mov al,[abs dword 0xffffffffcccccccc] + mov bl,[abs dword 0xffffffffcccccccc] + mov ax,[abs dword 0xffffffffcccccccc] + mov bx,[abs dword 0xffffffffcccccccc] + mov eax,[abs dword 0xffffffffcccccccc] + mov ebx,[abs dword 0xffffffffcccccccc] + mov rax,[abs dword 0xffffffffcccccccc] + mov rbx,[abs dword 0xffffffffcccccccc] + + mov al,[abs qword foo] + mov bl,[abs qword foo] + mov ax,[abs qword foo] + mov bx,[abs qword foo] + mov eax,[abs qword foo] + mov ebx,[abs qword foo] mov rax,[abs qword foo] + mov rbx,[abs qword foo] + mov al,[abs qword 0xaaaaaaaaaaaaaaaa] + mov bl,[abs qword 0xaaaaaaaaaaaaaaaa] + mov ax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov bx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov eax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov rax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov al,[abs qword 0xbbbbbbbb] + mov bl,[abs qword 0xbbbbbbbb] + mov ax,[abs qword 0xbbbbbbbb] + mov bx,[abs qword 0xbbbbbbbb] + mov eax,[abs qword 0xbbbbbbbb] + mov ebx,[abs qword 0xbbbbbbbb] + mov rax,[abs qword 0xbbbbbbbb] + mov rbx,[abs qword 0xbbbbbbbb] + mov al,[abs qword 0xffffffffcccccccc] + mov bl,[abs qword 0xffffffffcccccccc] + mov ax,[abs qword 0xffffffffcccccccc] + mov bx,[abs qword 0xffffffffcccccccc] + mov eax,[abs qword 0xffffffffcccccccc] + mov ebx,[abs qword 0xffffffffcccccccc] + mov rax,[abs qword 0xffffffffcccccccc] + mov rbx,[abs qword 0xffffffffcccccccc] + + mov al,[rel foo] + mov bl,[rel foo] + mov ax,[rel foo] + mov bx,[rel foo] + mov eax,[rel foo] + mov ebx,[rel foo] + mov rax,[rel foo] + mov rbx,[rel foo] + mov al,[rel 0xaaaaaaaaaaaaaaaa] + mov bl,[rel 0xaaaaaaaaaaaaaaaa] + mov ax,[rel 0xaaaaaaaaaaaaaaaa] + mov bx,[rel 0xaaaaaaaaaaaaaaaa] + mov eax,[rel 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel 0xaaaaaaaaaaaaaaaa] + mov rax,[rel 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel 0xaaaaaaaaaaaaaaaa] + mov al,[rel 0xbbbbbbbb] + mov bl,[rel 0xbbbbbbbb] + mov ax,[rel 0xbbbbbbbb] + mov bx,[rel 0xbbbbbbbb] + mov eax,[rel 0xbbbbbbbb] + mov ebx,[rel 0xbbbbbbbb] + mov rax,[rel 0xbbbbbbbb] + mov rbx,[rel 0xbbbbbbbb] + mov al,[rel 0xffffffffcccccccc] + mov bl,[rel 0xffffffffcccccccc] + mov ax,[rel 0xffffffffcccccccc] + mov bx,[rel 0xffffffffcccccccc] + mov eax,[rel 0xffffffffcccccccc] + mov ebx,[rel 0xffffffffcccccccc] + mov rax,[rel 0xffffffffcccccccc] + mov rbx,[rel 0xffffffffcccccccc] + + mov al,[rel dword foo] + mov bl,[rel dword foo] + mov ax,[rel dword foo] + mov bx,[rel dword foo] + mov eax,[rel dword foo] + mov ebx,[rel dword foo] + mov rax,[rel dword foo] + mov rbx,[rel dword foo] + mov al,[rel dword 0xaaaaaaaaaaaaaaaa] + mov bl,[rel dword 0xaaaaaaaaaaaaaaaa] + mov ax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov bx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov eax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov rax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov al,[rel dword 0xbbbbbbbb] + mov bl,[rel dword 0xbbbbbbbb] + mov ax,[rel dword 0xbbbbbbbb] + mov bx,[rel dword 0xbbbbbbbb] + mov eax,[rel dword 0xbbbbbbbb] + mov ebx,[rel dword 0xbbbbbbbb] + mov rax,[rel dword 0xbbbbbbbb] + mov rbx,[rel dword 0xbbbbbbbb] + mov al,[rel dword 0xffffffffcccccccc] + mov bl,[rel dword 0xffffffffcccccccc] + mov ax,[rel dword 0xffffffffcccccccc] + mov bx,[rel dword 0xffffffffcccccccc] + mov eax,[rel dword 0xffffffffcccccccc] + mov ebx,[rel dword 0xffffffffcccccccc] + mov rax,[rel dword 0xffffffffcccccccc] + mov rbx,[rel dword 0xffffffffcccccccc] + + mov al,[rel qword foo] + mov bl,[rel qword foo] + mov ax,[rel qword foo] + mov bx,[rel qword foo] + mov eax,[rel qword foo] + mov ebx,[rel qword foo] + mov rax,[rel qword foo] + mov rbx,[rel qword foo] + mov al,[rel qword 0xaaaaaaaaaaaaaaaa] + mov bl,[rel qword 0xaaaaaaaaaaaaaaaa] + mov ax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov bx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov eax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov rax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov al,[rel qword 0xbbbbbbbb] + mov bl,[rel qword 0xbbbbbbbb] + mov ax,[rel qword 0xbbbbbbbb] + mov bx,[rel qword 0xbbbbbbbb] + mov eax,[rel qword 0xbbbbbbbb] + mov ebx,[rel qword 0xbbbbbbbb] + mov rax,[rel qword 0xbbbbbbbb] + mov rbx,[rel qword 0xbbbbbbbb] + mov al,[rel qword 0xffffffffcccccccc] + mov bl,[rel qword 0xffffffffcccccccc] + mov ax,[rel qword 0xffffffffcccccccc] + mov bx,[rel qword 0xffffffffcccccccc] + mov eax,[rel qword 0xffffffffcccccccc] + mov ebx,[rel qword 0xffffffffcccccccc] + mov rax,[rel qword 0xffffffffcccccccc] + mov rbx,[rel qword 0xffffffffcccccccc] - mov rax,[es:foo] - mov rax,[es:123456789abcdef0h] - mov rbx,[es:foo] - mov rax,[dword es:foo] - mov rbx,[dword es:foo] - mov rax,[qword es:foo] - mov rax,[rel es:foo] - mov rbx,[rel es:foo] - mov rax,[rel dword es:foo] - mov rax,[rel qword es:foo] - mov rax,[abs es:foo] - mov rbx,[abs es:foo] - mov rax,[abs dword es:foo] - mov rax,[abs qword es:foo] - - mov rax,[fs:foo] - mov rax,[fs:123456789abcdef0h] - mov rbx,[fs:foo] - mov rax,[dword fs:foo] - mov rbx,[dword fs:foo] - mov rax,[qword fs:foo] - mov rax,[rel fs:foo] - mov rbx,[rel fs:foo] - mov rax,[rel dword fs:foo] - mov rax,[rel qword fs:foo] - mov rax,[abs fs:foo] - mov rbx,[abs fs:foo] - mov rax,[abs dword fs:foo] - mov rax,[abs qword fs:foo] default rel - + + mov al,[foo] + mov bl,[foo] + mov ax,[foo] + mov bx,[foo] + mov eax,[foo] + mov ebx,[foo] mov rax,[foo] - mov rax,[123456789abcdef0h] mov rbx,[foo] + mov al,[0xaaaaaaaaaaaaaaaa] + mov bl,[0xaaaaaaaaaaaaaaaa] + mov ax,[0xaaaaaaaaaaaaaaaa] + mov bx,[0xaaaaaaaaaaaaaaaa] + mov eax,[0xaaaaaaaaaaaaaaaa] + mov ebx,[0xaaaaaaaaaaaaaaaa] + mov rax,[0xaaaaaaaaaaaaaaaa] + mov rbx,[0xaaaaaaaaaaaaaaaa] + mov al,[0xbbbbbbbb] + mov bl,[0xbbbbbbbb] + mov ax,[0xbbbbbbbb] + mov bx,[0xbbbbbbbb] + mov eax,[0xbbbbbbbb] + mov ebx,[0xbbbbbbbb] + mov rax,[0xbbbbbbbb] + mov rbx,[0xbbbbbbbb] + mov al,[0xffffffffcccccccc] + mov bl,[0xffffffffcccccccc] + mov ax,[0xffffffffcccccccc] + mov bx,[0xffffffffcccccccc] + mov eax,[0xffffffffcccccccc] + mov ebx,[0xffffffffcccccccc] + mov rax,[0xffffffffcccccccc] + mov rbx,[0xffffffffcccccccc] + + mov al,[dword foo] + mov bl,[dword foo] + mov ax,[dword foo] + mov bx,[dword foo] + mov eax,[dword foo] + mov ebx,[dword foo] mov rax,[dword foo] mov rbx,[dword foo] + mov al,[dword 0xaaaaaaaaaaaaaaaa] + mov bl,[dword 0xaaaaaaaaaaaaaaaa] + mov ax,[dword 0xaaaaaaaaaaaaaaaa] + mov bx,[dword 0xaaaaaaaaaaaaaaaa] + mov eax,[dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[dword 0xaaaaaaaaaaaaaaaa] + mov rax,[dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[dword 0xaaaaaaaaaaaaaaaa] + mov al,[dword 0xbbbbbbbb] + mov bl,[dword 0xbbbbbbbb] + mov ax,[dword 0xbbbbbbbb] + mov bx,[dword 0xbbbbbbbb] + mov eax,[dword 0xbbbbbbbb] + mov ebx,[dword 0xbbbbbbbb] + mov rax,[dword 0xbbbbbbbb] + mov rbx,[dword 0xbbbbbbbb] + mov al,[dword 0xffffffffcccccccc] + mov bl,[dword 0xffffffffcccccccc] + mov ax,[dword 0xffffffffcccccccc] + mov bx,[dword 0xffffffffcccccccc] + mov eax,[dword 0xffffffffcccccccc] + mov ebx,[dword 0xffffffffcccccccc] + mov rax,[dword 0xffffffffcccccccc] + mov rbx,[dword 0xffffffffcccccccc] + + mov al,[qword foo] + mov bl,[qword foo] + mov ax,[qword foo] + mov bx,[qword foo] + mov eax,[qword foo] + mov ebx,[qword foo] mov rax,[qword foo] - mov rax,[rel foo] - mov rbx,[rel foo] - mov rax,[rel dword foo] - mov rax,[rel qword foo] + mov rbx,[qword foo] + mov al,[qword 0xaaaaaaaaaaaaaaaa] + mov bl,[qword 0xaaaaaaaaaaaaaaaa] + mov ax,[qword 0xaaaaaaaaaaaaaaaa] + mov bx,[qword 0xaaaaaaaaaaaaaaaa] + mov eax,[qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[qword 0xaaaaaaaaaaaaaaaa] + mov rax,[qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[qword 0xaaaaaaaaaaaaaaaa] + mov al,[qword 0xbbbbbbbb] + mov bl,[qword 0xbbbbbbbb] + mov ax,[qword 0xbbbbbbbb] + mov bx,[qword 0xbbbbbbbb] + mov eax,[qword 0xbbbbbbbb] + mov ebx,[qword 0xbbbbbbbb] + mov rax,[qword 0xbbbbbbbb] + mov rbx,[qword 0xbbbbbbbb] + mov al,[qword 0xffffffffcccccccc] + mov bl,[qword 0xffffffffcccccccc] + mov ax,[qword 0xffffffffcccccccc] + mov bx,[qword 0xffffffffcccccccc] + mov eax,[qword 0xffffffffcccccccc] + mov ebx,[qword 0xffffffffcccccccc] + mov rax,[qword 0xffffffffcccccccc] + mov rbx,[qword 0xffffffffcccccccc] + + mov al,[abs foo] + mov bl,[abs foo] + mov ax,[abs foo] + mov bx,[abs foo] + mov eax,[abs foo] + mov ebx,[abs foo] mov rax,[abs foo] mov rbx,[abs foo] + mov al,[abs 0xaaaaaaaaaaaaaaaa] + mov bl,[abs 0xaaaaaaaaaaaaaaaa] + mov ax,[abs 0xaaaaaaaaaaaaaaaa] + mov bx,[abs 0xaaaaaaaaaaaaaaaa] + mov eax,[abs 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs 0xaaaaaaaaaaaaaaaa] + mov rax,[abs 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs 0xaaaaaaaaaaaaaaaa] + mov al,[abs 0xbbbbbbbb] + mov bl,[abs 0xbbbbbbbb] + mov ax,[abs 0xbbbbbbbb] + mov bx,[abs 0xbbbbbbbb] + mov eax,[abs 0xbbbbbbbb] + mov ebx,[abs 0xbbbbbbbb] + mov rax,[abs 0xbbbbbbbb] + mov rbx,[abs 0xbbbbbbbb] + mov al,[abs 0xffffffffcccccccc] + mov bl,[abs 0xffffffffcccccccc] + mov ax,[abs 0xffffffffcccccccc] + mov bx,[abs 0xffffffffcccccccc] + mov eax,[abs 0xffffffffcccccccc] + mov ebx,[abs 0xffffffffcccccccc] + mov rax,[abs 0xffffffffcccccccc] + mov rbx,[abs 0xffffffffcccccccc] + + mov al,[abs dword foo] + mov bl,[abs dword foo] + mov ax,[abs dword foo] + mov bx,[abs dword foo] + mov eax,[abs dword foo] + mov ebx,[abs dword foo] mov rax,[abs dword foo] + mov rbx,[abs dword foo] + mov al,[abs dword 0xaaaaaaaaaaaaaaaa] + mov bl,[abs dword 0xaaaaaaaaaaaaaaaa] + mov ax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov bx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov eax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov rax,[abs dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs dword 0xaaaaaaaaaaaaaaaa] + mov al,[abs dword 0xbbbbbbbb] + mov bl,[abs dword 0xbbbbbbbb] + mov ax,[abs dword 0xbbbbbbbb] + mov bx,[abs dword 0xbbbbbbbb] + mov eax,[abs dword 0xbbbbbbbb] + mov ebx,[abs dword 0xbbbbbbbb] + mov rax,[abs dword 0xbbbbbbbb] + mov rbx,[abs dword 0xbbbbbbbb] + mov al,[abs dword 0xffffffffcccccccc] + mov bl,[abs dword 0xffffffffcccccccc] + mov ax,[abs dword 0xffffffffcccccccc] + mov bx,[abs dword 0xffffffffcccccccc] + mov eax,[abs dword 0xffffffffcccccccc] + mov ebx,[abs dword 0xffffffffcccccccc] + mov rax,[abs dword 0xffffffffcccccccc] + mov rbx,[abs dword 0xffffffffcccccccc] + + mov al,[abs qword foo] + mov bl,[abs qword foo] + mov ax,[abs qword foo] + mov bx,[abs qword foo] + mov eax,[abs qword foo] + mov ebx,[abs qword foo] mov rax,[abs qword foo] + mov rbx,[abs qword foo] + mov al,[abs qword 0xaaaaaaaaaaaaaaaa] + mov bl,[abs qword 0xaaaaaaaaaaaaaaaa] + mov ax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov bx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov eax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov rax,[abs qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[abs qword 0xaaaaaaaaaaaaaaaa] + mov al,[abs qword 0xbbbbbbbb] + mov bl,[abs qword 0xbbbbbbbb] + mov ax,[abs qword 0xbbbbbbbb] + mov bx,[abs qword 0xbbbbbbbb] + mov eax,[abs qword 0xbbbbbbbb] + mov ebx,[abs qword 0xbbbbbbbb] + mov rax,[abs qword 0xbbbbbbbb] + mov rbx,[abs qword 0xbbbbbbbb] + mov al,[abs qword 0xffffffffcccccccc] + mov bl,[abs qword 0xffffffffcccccccc] + mov ax,[abs qword 0xffffffffcccccccc] + mov bx,[abs qword 0xffffffffcccccccc] + mov eax,[abs qword 0xffffffffcccccccc] + mov ebx,[abs qword 0xffffffffcccccccc] + mov rax,[abs qword 0xffffffffcccccccc] + mov rbx,[abs qword 0xffffffffcccccccc] + + mov al,[rel foo] + mov bl,[rel foo] + mov ax,[rel foo] + mov bx,[rel foo] + mov eax,[rel foo] + mov ebx,[rel foo] + mov rax,[rel foo] + mov rbx,[rel foo] + mov al,[rel 0xaaaaaaaaaaaaaaaa] + mov bl,[rel 0xaaaaaaaaaaaaaaaa] + mov ax,[rel 0xaaaaaaaaaaaaaaaa] + mov bx,[rel 0xaaaaaaaaaaaaaaaa] + mov eax,[rel 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel 0xaaaaaaaaaaaaaaaa] + mov rax,[rel 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel 0xaaaaaaaaaaaaaaaa] + mov al,[rel 0xbbbbbbbb] + mov bl,[rel 0xbbbbbbbb] + mov ax,[rel 0xbbbbbbbb] + mov bx,[rel 0xbbbbbbbb] + mov eax,[rel 0xbbbbbbbb] + mov ebx,[rel 0xbbbbbbbb] + mov rax,[rel 0xbbbbbbbb] + mov rbx,[rel 0xbbbbbbbb] + mov al,[rel 0xffffffffcccccccc] + mov bl,[rel 0xffffffffcccccccc] + mov ax,[rel 0xffffffffcccccccc] + mov bx,[rel 0xffffffffcccccccc] + mov eax,[rel 0xffffffffcccccccc] + mov ebx,[rel 0xffffffffcccccccc] + mov rax,[rel 0xffffffffcccccccc] + mov rbx,[rel 0xffffffffcccccccc] + + mov al,[rel dword foo] + mov bl,[rel dword foo] + mov ax,[rel dword foo] + mov bx,[rel dword foo] + mov eax,[rel dword foo] + mov ebx,[rel dword foo] + mov rax,[rel dword foo] + mov rbx,[rel dword foo] + mov al,[rel dword 0xaaaaaaaaaaaaaaaa] + mov bl,[rel dword 0xaaaaaaaaaaaaaaaa] + mov ax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov bx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov eax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov rax,[rel dword 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel dword 0xaaaaaaaaaaaaaaaa] + mov al,[rel dword 0xbbbbbbbb] + mov bl,[rel dword 0xbbbbbbbb] + mov ax,[rel dword 0xbbbbbbbb] + mov bx,[rel dword 0xbbbbbbbb] + mov eax,[rel dword 0xbbbbbbbb] + mov ebx,[rel dword 0xbbbbbbbb] + mov rax,[rel dword 0xbbbbbbbb] + mov rbx,[rel dword 0xbbbbbbbb] + mov al,[rel dword 0xffffffffcccccccc] + mov bl,[rel dword 0xffffffffcccccccc] + mov ax,[rel dword 0xffffffffcccccccc] + mov bx,[rel dword 0xffffffffcccccccc] + mov eax,[rel dword 0xffffffffcccccccc] + mov ebx,[rel dword 0xffffffffcccccccc] + mov rax,[rel dword 0xffffffffcccccccc] + mov rbx,[rel dword 0xffffffffcccccccc] + + mov al,[rel qword foo] + mov bl,[rel qword foo] + mov ax,[rel qword foo] + mov bx,[rel qword foo] + mov eax,[rel qword foo] + mov ebx,[rel qword foo] + mov rax,[rel qword foo] + mov rbx,[rel qword foo] + mov al,[rel qword 0xaaaaaaaaaaaaaaaa] + mov bl,[rel qword 0xaaaaaaaaaaaaaaaa] + mov ax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov bx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov eax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov ebx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov rax,[rel qword 0xaaaaaaaaaaaaaaaa] + mov rbx,[rel qword 0xaaaaaaaaaaaaaaaa] + mov al,[rel qword 0xbbbbbbbb] + mov bl,[rel qword 0xbbbbbbbb] + mov ax,[rel qword 0xbbbbbbbb] + mov bx,[rel qword 0xbbbbbbbb] + mov eax,[rel qword 0xbbbbbbbb] + mov ebx,[rel qword 0xbbbbbbbb] + mov rax,[rel qword 0xbbbbbbbb] + mov rbx,[rel qword 0xbbbbbbbb] + mov al,[rel qword 0xffffffffcccccccc] + mov bl,[rel qword 0xffffffffcccccccc] + mov ax,[rel qword 0xffffffffcccccccc] + mov bx,[rel qword 0xffffffffcccccccc] + mov eax,[rel qword 0xffffffffcccccccc] + mov ebx,[rel qword 0xffffffffcccccccc] + mov rax,[rel qword 0xffffffffcccccccc] + mov rbx,[rel qword 0xffffffffcccccccc] + - mov rax,[es:foo] - mov rax,[es:123456789abcdef0h] - mov rbx,[es:foo] - mov rax,[dword es:foo] - mov rbx,[dword es:foo] - mov rax,[qword es:foo] - mov rax,[rel es:foo] - mov rbx,[rel es:foo] - mov rax,[rel dword es:foo] - mov rax,[rel qword es:foo] - mov rax,[abs es:foo] - mov rbx,[abs es:foo] - mov rax,[abs dword es:foo] - mov rax,[abs qword es:foo] - - mov rax,[fs:foo] - mov rax,[fs:123456789abcdef0h] - mov rbx,[fs:foo] - mov rax,[dword fs:foo] - mov rbx,[dword fs:foo] - mov rax,[qword fs:foo] - mov rax,[rel fs:foo] - mov rbx,[rel fs:foo] - mov rax,[rel dword fs:foo] - mov rax,[rel qword fs:foo] - mov rax,[abs fs:foo] - mov rbx,[abs fs:foo] - mov rax,[abs dword fs:foo] - mov rax,[abs qword fs:foo] - - section .data -foo equ $ -
\ No newline at end of file +foo: diff --git a/test/riprel.pl b/test/riprel.pl new file mode 100644 index 0000000..fa4405e --- /dev/null +++ b/test/riprel.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +print "\tbits 64\n"; + +foreach $mode ('abs', 'rel') { + print "\n\tdefault $mode\n\n"; + + foreach $rq ('', 'abs ', 'rel ') { + foreach $sq ('', 'dword ', 'qword ') { + foreach $v ('foo', '0xaaaaaaaaaaaaaaaa', '0xbbbbbbbb', + '0xffffffffcccccccc') { + foreach $r ('al', 'bl', 'ax', 'bx', 'eax', 'ebx', 'rax', 'rbx') { + print "\tmov $r,[$rq$sq$v]\n"; + } + } + print "\n"; + } + } +} + +print "\nfoo:\n"; + + |