llvm-project/llvm/test/DebugInfo/X86
Adrian Prantl 092d9489ed Debug Info: Move the complex expression handling (=the remainder) of
emitDebugLocValue() into DwarfExpression.

Ought to be NFC, but it actually uncovered a bug in the debug-loc-asan.ll
testcase. The testcase checks that the address of variable "y" is stored
at [RSP+16], which also lines up with the comment.
It also check(ed) that the *value* of "y" is stored in RDI before that,
but that is actually incorrect, since RDI is the very value that is
stored in [RSP+16]. Here's the assembler output:

	movb	2147450880(%rcx), %r8b
	#DEBUG_VALUE: bar:y <- RDI
	cmpb	$0, %r8b
	movq	%rax, 32(%rsp)          # 8-byte Spill
	movq	%rsi, 24(%rsp)          # 8-byte Spill
	movq	%rdi, 16(%rsp)          # 8-byte Spill
.Ltmp3:
	#DEBUG_VALUE: bar:y <- [RSP+16]

Fixed the comment to spell out the correct register and the check to
expect an address rather than a value.

Note that the range that is emitted for the RDI location was and is still
wrong, it claims to begin at the function prologue, but really it should
start where RDI is first assigned.

llvm-svn: 225851
2015-01-13 23:39:11 +00:00
..
2010-04-13-PubType.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
2010-08-10-DbgConstant.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
2011-09-26-GlobalVarContext.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
2011-12-16-BadStructRef.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_byte_size.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_linkage_name.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_location-reference.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_object_pointer.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_specification.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_AT_stmt_list_sec_offset.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
DW_TAG_friend.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
aligned_stack_var.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
arange.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
arguments.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
array2.ll Revert "Reapply: Teach SROA how to update debug info for fragmented variables." 2015-01-08 02:02:00 +00:00
asm-macro-line-number.s IAS: correct debug line info for asm macros 2014-12-24 06:32:43 +00:00
block-capture.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
byvalstruct.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
c-type-units.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
coff_debug_info_type.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
coff_relative_names.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
concrete_out_of_line.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
constant-aggregate.ll Debug info: Allow aggregate types to be described by constants. 2015-01-07 20:48:58 +00:00
cu-ranges-odr.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
cu-ranges.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
data_member_location.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-asm.s MC: correct DWARF line info for PE/COFF 2014-09-06 19:57:48 +00:00
dbg-at-specficiation.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-byval-parameter.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-const-int.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-const.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-declare-arg.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-declare.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-file-name.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-i128-const.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-merge-loc-entry.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-prolog-end.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-subrange.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-const-byref.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-dag-combine.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-inlined-parameter.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-isel.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-location.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-range.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-value-terminator.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg_value_direct.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-dead-local-var.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-info-access.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-info-block-captured-self.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-info-blocks.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-info-static-member.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-loc-asan.ll Debug Info: Move the complex expression handling (=the remainder) of 2015-01-13 23:39:11 +00:00
debug-loc-offset.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-ranges-offset.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug_frame.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
decl-derived-member.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
discriminator.ll DebugInfo: Omit is_stmt from line table entries on the same line. 2014-12-30 22:47:13 +00:00
dwarf-aranges-no-dwarf-labels.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dwarf-aranges.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dwarf-public-names.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dwarf-pubnames-split.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
earlydup-crash.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
elf-names.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
empty-and-one-elem-array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
empty-array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
ending-run.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
enum-class.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
enum-fwd-decl.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-cu.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-hash.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-inline.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-ranges.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
formal_parameter.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
generate-odr-hash.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
ghost-sdnode-dbgvalues.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
gmlt.test llvm/test/DebugInfo/X86/gmlt.test: Get rid of %llc_dwarf. It should not be used with -mtriple. 2014-10-01 00:29:16 +00:00
gnu-public-names-empty.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
gnu-public-names.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
inline-member-function.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
inline-seldag-test.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
instcombine-instrinsics.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
lexical_block.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
line-info.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
linkage-name.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
low-pc-cu.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
main-file-name.s Now that llvm-dwarfdump supports flags to specify which DWARF section to dump, 2013-01-25 21:44:53 +00:00
memberfnptr.ll Debug Info: In symmetry to DW_TAG_pointer_type, do not emit the byte size 2014-12-24 01:17:51 +00:00
misched-dbg-value.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
multiple-aranges.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
multiple-at-const-val.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
nodebug_with_debug_loc.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
nondefault-subrange-array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
objc-fwd-decl.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
objc-property-void.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
op_deref.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
parameters.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pieces-1.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pieces-2.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pieces-3.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pointer-type-size.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr11300.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr12831.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr13303.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr19307.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
processes-relocations.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
prologue-stack.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
recursive_inlining.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
ref_addr_relocation.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
reference-argument.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
rvalue-ref.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
sret.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
stmt-list-multiple-compile-units.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
stmt-list.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
stringpool.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
struct-loc.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
subrange-type.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
subreg.ll Debug info: Factor out the creation of DWARF expressions from AsmPrinter 2015-01-12 22:19:22 +00:00
subregisters.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
template.ll PR21875: codegen for non-type template parameters of nullptr_t type 2014-12-17 00:43:22 +00:00
tls.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
type_units_with_addresses.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
union-template.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
vector.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
vla.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00