brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 441bf17 Raw
58 lines · plain
1# RUN: llvm-mc -triple i686-windows-gnu -filetype obj -o - %s \2# RUN:    | llvm-readobj --coff-directives --symbols - | FileCheck %s3 4# NOTE: this test checks multiple things:5# - that -aligncomm is not emitted for 1-byte alignment6# - that -aligncomm is emitted for the various alignments (greater than 1)7# - that the alignment is represented as a log_2 of the alignment8# - that the section switching occurs correctly9# - that functions after the switch also are emitted into the correct section10 11	.text12 13	.def _a14		.scl 315		.type 3216	.endef17_a:18	ret19 20	.data21 22	.comm _s_1,4,0                  # @s_123	.comm _s_2,4,1                  # @s_224	.comm _s_4,4,2                  # @s_325	.comm _s_8,4,3                  # @s_426 27	.comm _small_but_overaligned,1,3                  # @s_428 29	.text30 31	.def _b32		.scl 333		.type 3234	.endef35_b:36	ret37 38# CHECK-NOT: -aligncomm:"_s_1",039 40# CHECK: Symbols [41# CHECK:   Symbol {42# CHECK:     Name: _a43# CHECK:     Section: .text (1)44# CHECK:   }45# CHECK:   Symbol {46# CHECK:     Name: _small_but_overaligned47# CHECK-NEXT:Value: 148# CHECK-NEXT:Section: IMAGE_SYM_UNDEFINED (0)49# CHECK:   }50# CHECK:   Symbol {51# CHECK:     Name: _b52# CHECK:     Section: .text (1)53# CHECK:   }54# CHECK: ]55 56# CHECK: Directive(s): -aligncomm:"_s_2",1 -aligncomm:"_s_4",2 -aligncomm:"_s_8",3 -aligncomm:"_small_but_overaligned",357 58