mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
0180daee02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98972 91177308-0d34-0410-b5e6-96231b3b80d8
55 lines
1.7 KiB
ArmAsm
55 lines
1.7 KiB
ArmAsm
// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
|
|
|
|
movl foo(%rip), %eax
|
|
// CHECK: movl foo(%rip), %eax
|
|
// CHECK: encoding: [0x8b,0x05,A,A,A,A]
|
|
// CHECK: fixup A - offset: 2, value: foo-4, kind: reloc_riprel_4byte
|
|
|
|
movb $12, foo(%rip)
|
|
// CHECK: movb $12, foo(%rip)
|
|
// CHECK: encoding: [0xc6,0x05,A,A,A,A,0x0c]
|
|
// CHECK: fixup A - offset: 2, value: foo-5, kind: reloc_riprel_4byte
|
|
|
|
movw $12, foo(%rip)
|
|
// CHECK: movw $12, foo(%rip)
|
|
// CHECK: encoding: [0x66,0xc7,0x05,A,A,A,A,0x0c,0x00]
|
|
// CHECK: fixup A - offset: 3, value: foo-6, kind: reloc_riprel_4byte
|
|
|
|
movl $12, foo(%rip)
|
|
// CHECK: movl $12, foo(%rip)
|
|
// CHECK: encoding: [0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
|
|
// CHECK: fixup A - offset: 2, value: foo-8, kind: reloc_riprel_4byte
|
|
|
|
movq $12, foo(%rip)
|
|
// CHECK: movq $12, foo(%rip)
|
|
// CHECK: encoding: [0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
|
|
// CHECK: fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte
|
|
|
|
// CHECK: addq $-424, %rax
|
|
// CHECK: encoding: [0x48,0x05,0x58,0xfe,0xff,0xff]
|
|
addq $-424, %rax
|
|
|
|
|
|
// CHECK: movq _foo@GOTPCREL(%rip), %rax
|
|
// CHECK: encoding: [0x48,0x8b,0x05,A,A,A,A]
|
|
// CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
|
|
movq _foo@GOTPCREL(%rip), %rax
|
|
|
|
// CHECK: movq _foo@GOTPCREL(%rip), %r14
|
|
// CHECK: encoding: [0x4c,0x8b,0x35,A,A,A,A]
|
|
// CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
|
|
movq _foo@GOTPCREL(%rip), %r14
|
|
|
|
|
|
// CHECK: movq (%r13,%rax,8), %r13
|
|
// CHECK: encoding: [0x4d,0x8b,0x6c,0xc5,0x00]
|
|
movq 0x00(%r13,%rax,8),%r13
|
|
|
|
// CHECK: testq %rax, %rbx
|
|
// CHECK: encoding: [0x48,0x85,0xd8]
|
|
testq %rax, %rbx
|
|
|
|
// CHECK: cmpq %rbx, %r14
|
|
// CHECK: encoding: [0x49,0x39,0xde]
|
|
cmpq %rbx, %r14
|