summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-01-24 16:57:55 +0000
committerReid Kleckner <rnk@google.com>2017-01-24 16:57:55 +0000
commit11cf053bd19b7c98799b3cb97b9b7d34fe8ac491 (patch)
tree22db1f05d6ec9c5fec5c01229432c5a97b54e193 /llvm/test/MC
parent1b80a146857b3184ff8efe2b0068442d4dc728ae (diff)
downloadbcm5719-llvm-11cf053bd19b7c98799b3cb97b9b7d34fe8ac491.tar.gz
bcm5719-llvm-11cf053bd19b7c98799b3cb97b9b7d34fe8ac491.zip
[CodeView] Fix off-by-one error in def range gap emission
Also fixes a much worse bug where we emitted the wrong gap size for the def range uncovered by the test for this issue. Fixes PR31726. llvm-svn: 292949
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/COFF/cv-def-range-gap.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/MC/COFF/cv-def-range-gap.s b/llvm/test/MC/COFF/cv-def-range-gap.s
index 243e777d92e..9c153181996 100644
--- a/llvm/test/MC/COFF/cv-def-range-gap.s
+++ b/llvm/test/MC/COFF/cv-def-range-gap.s
@@ -38,6 +38,19 @@
# CHECK-NEXT: Range: 0x1
# CHECK-NEXT: }
# CHECK-NEXT: }
+# CHECK-NEXT: DefRangeRegister {
+# CHECK-NEXT: Register: 23
+# CHECK-NEXT: MayHaveNoName: 0
+# CHECK-NEXT: LocalVariableAddrRange {
+# CHECK-NEXT: OffsetStart: .text+0x2001C
+# CHECK-NEXT: ISectStart: 0x0
+# CHECK-NEXT: Range: 0xF000
+# CHECK-NEXT: }
+# CHECK-NEXT: LocalVariableAddrGap [
+# CHECK-NEXT: GapStartOffset: 0x1
+# CHECK-NEXT: Range: 0xEFFE
+# CHECK-NEXT: ]
+# CHECK-NEXT: }
.text
f: # @f
@@ -62,6 +75,16 @@ f: # @f
.Lbegin3:
nop
.Lend3:
+
+ # Create a range that is exactly 0xF000 bytes long with a gap in the
+ # middle.
+.Lbegin4:
+ nop
+.Lend4:
+ .fill 0xeffe, 1, 0x90
+.Lbegin5:
+ nop
+.Lend5:
ret
.Lfunc_end0:
@@ -94,6 +117,7 @@ f: # @f
.asciz "p"
.Ltmp19:
.cv_def_range .Lbegin0 .Lend0 .Lbegin1 .Lend1 .Lbegin2 .Lend2 .Lbegin3 .Lend3, "A\021\027\000\000\000"
+ .cv_def_range .Lbegin4 .Lend4 .Lbegin5 .Lend5, "A\021\027\000\000\000"
.short 2 # Record length
.short 4431 # Record kind: S_PROC_ID_END
.Ltmp15:
OpenPOWER on IntegriCloud