История изменений
Исправление luke, (текущая версия) :
Эксперименты!
Исходная версия luke, :
Век живи, век учись:
[luke@YavinIV LOR]$ cat test.s
# AT&T syntax
# Add 3 and 2
.global _start
.text
_start: movq $0x0123456789abcdef,%rax
movl $0x0000ffff,%eax
movq $0x0123456789abcdef,%rax
movw $0x00ff,%ax
movq $0x0123456789abcdef,%rax
movb $0x0f,%ah
movq $0x0123456789abcdef,%rax
movb $0x0f,%al
movq $1,%rax #halt programm
int $0x80 #call linux
[luke@YavinIV LOR]$ as test.s -g -o test.o
[luke@YavinIV LOR]$ ld test.o -g -o test
[luke@YavinIV LOR]$ gdb ./test
...
(gdb) b _start
Breakpoint 1 at 0x400078: file test.s, line 7.
(gdb) r
Starting program: /home/luke/asm/LOR/test
Breakpoint 1, _start () at test.s:7
7 _start: movq $0x0123456789abcdef,%rax
(gdb) si
8 movl $0x0000ffff,%eax
(gdb) p/x $rax
$1 = 0x123456789abcdef
(gdb) si
9 movq $0x0123456789abcdef,%rax
(gdb) p/x $rax
$2 = 0xffff
(gdb) si
10 movw $0x00ff,%ax
(gdb) p/x $rax
$3 = 0x123456789abcdef
(gdb) si
11 movq $0x0123456789abcdef,%rax
(gdb) p/x $rax
$4 = 0x123456789ab00ff
(gdb) si
12 movb $0x0f,%ah
(gdb) p/x $rax
$5 = 0x123456789abcdef
(gdb) si
13 movq $0x0123456789abcdef,%rax
(gdb) p/x $rax
$6 = 0x123456789ab0fef
(gdb) si
14 movb $0x0f,%al
(gdb) p/x $rax
$7 = 0x123456789abcdef
(gdb) si
16 movq $1,%rax #halt programm
(gdb) p/x $rax
$8 = 0x123456789abcd0f
(gdb) quit
A debugging session is active.
Inferior 1 [process 21303] will be killed.
Quit anyway? (y or n) y
То есть для 32- и 16-битных команд сохраняется совместимость с i386, а вот логичной совместимости для 64 бит не наблюдается.