mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Add hook in MCSection to decide when to use "optimized nops", for each
section kind. Previously, optimized nops were only used for MachO. Also added tests for ELF and COFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
45
test/MC/COFF/align-nops.s
Normal file
45
test/MC/COFF/align-nops.s
Normal file
@@ -0,0 +1,45 @@
|
||||
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o %t
|
||||
// RUN: coff-dump.py %abs_tmp | FileCheck %s
|
||||
|
||||
// Test that we get optimal nops in text
|
||||
.text
|
||||
f0:
|
||||
.long 0
|
||||
.align 8, 0x90
|
||||
.long 0
|
||||
.align 8
|
||||
|
||||
// But not in another section
|
||||
.data
|
||||
.long 0
|
||||
.align 8, 0x90
|
||||
.long 0
|
||||
.align 8
|
||||
|
||||
//CHECK: Name = .text
|
||||
//CHECK-NEXT: VirtualSize
|
||||
//CHECK-NEXT: VirtualAddress
|
||||
//CHECK-NEXT: SizeOfRawData = 16
|
||||
//CHECK-NEXT: PointerToRawData
|
||||
//CHECK-NEXT: PointerToRelocations
|
||||
//CHECK-NEXT: PointerToLineNumbers
|
||||
//CHECK-NEXT: NumberOfRelocations
|
||||
//CHECK-NEXT: NumberOfLineNumbers
|
||||
//CHECK-NEXT: Charateristics = 0x400001
|
||||
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
|
||||
//CHECK-NEXT: SectionData =
|
||||
//CHECK-NEXT: 00 00 00 00 0F 1F 40 00 - 00 00 00 00 0F 1F 40 00
|
||||
|
||||
//CHECK: Name = .data
|
||||
//CHECK-NEXT: VirtualSize
|
||||
//CHECK-NEXT: VirtualAddress
|
||||
//CHECK-NEXT: SizeOfRawData = 16
|
||||
//CHECK-NEXT: PointerToRawData
|
||||
//CHECK-NEXT: PointerToRelocations
|
||||
//CHECK-NEXT: PointerToLineNumbers
|
||||
//CHECK-NEXT: NumberOfRelocations
|
||||
//CHECK-NEXT: NumberOfLineNumbers
|
||||
//CHECK-NEXT: Charateristics = 0x400001
|
||||
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
|
||||
//CHECK-NEXT: SectionData =
|
||||
//CHECK-NEXT: 00 00 00 00 90 90 90 90 - 00 00 00 00 00 00 00 00
|
@@ -1,5 +1,5 @@
|
||||
load_lib llvm.exp
|
||||
|
||||
if { [llvm_supports_target X86] } {
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,s}]]
|
||||
}
|
||||
|
Reference in New Issue
Block a user