diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-21 18:29:01 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-21 18:29:01 +0000 |
commit | 8fcefbef83fc2801f69518555224a19d8d973a73 (patch) | |
tree | 6a94c62766d730622c20c3a2ab24da931415e57e /test/MC | |
parent | bfae8f375d8d4ba950a732602d9d9996c93a6fdb (diff) | |
download | external_llvm-8fcefbef83fc2801f69518555224a19d8d973a73.zip external_llvm-8fcefbef83fc2801f69518555224a19d8d973a73.tar.gz external_llvm-8fcefbef83fc2801f69518555224a19d8d973a73.tar.bz2 |
llvm-mc/Mach-O: Support byte and fill value emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/MachO/data.s | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/MC/MachO/data.s b/test/MC/MachO/data.s new file mode 100644 index 0000000..3d39b53 --- /dev/null +++ b/test/MC/MachO/data.s @@ -0,0 +1,60 @@ +// RUN: llvm-mc %s -filetype=obj -o - | macho-dump | FileCheck %s + + .data + .ascii "hello" + .byte 0xAB + .short 0xABCD + .long 0xABCDABCD + .quad 0xABCDABCDABCDABCD + +// CHECK: ('cputype', 7) +// CHECK: ('cpusubtype', 3) +// CHECK: ('filetype', 1) +// CHECK: ('num_load_commands', 1) +// CHECK: ('load_commands_size', 192) +// CHECK: ('flag', 0) +// CHECK: ('load_commands', [ +// CHECK: # Load Command 0 +// CHECK: (('command', 1) +// CHECK: ('size', 192) +// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK: ('vm_addr', 0) +// CHECK: ('vm_size', 20) +// CHECK: ('file_offset', 220) +// CHECK: ('file_size', 20) +// CHECK: ('maxprot', 7) +// CHECK: ('initprot', 7) +// CHECK: ('num_sections', 2) +// CHECK: ('flags', 0) +// CHECK: ('sections', [ +// CHECK: # Section 0 +// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK: ('address', 0) +// CHECK: ('size', 0) +// CHECK: ('offset', 220) +// CHECK: ('alignment', 0) +// CHECK: ('reloc_offset', 0) +// CHECK: ('num_reloc', 0) +// CHECK: ('flags', 0x80000000) +// CHECK: ('reserved1', 0) +// CHECK: ('reserved2', 0) +// CHECK: ), +// CHECK: # Section 1 +// CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +// CHECK: ('address', 0) +// CHECK: ('size', 20) +// CHECK: ('offset', 220) +// CHECK: ('alignment', 0) +// CHECK: ('reloc_offset', 0) +// CHECK: ('num_reloc', 0) +// CHECK: ('flags', 0x0) +// CHECK: ('reserved1', 0) +// CHECK: ('reserved2', 0) +// CHECK: ), +// CHECK: ]) +// CHECK: ), +// CHECK: ]) + +// FIXME: Dump contents, so we can check those too. |