llvm.org GIT mirror llvm / 8eea339
Provide correct DWARF register numbering for debug information emission on x86-32/Darwin. This should fix bunch of issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46337 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 12 years ago
3 changed file(s) with 9 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
6363 unsigned Flavour = DWARFFlavour::X86_64;
6464 if (!Subtarget->is64Bit()) {
6565 if (Subtarget->isTargetDarwin()) {
66 Flavour = DWARFFlavour::X86_32_Darwin;
66 if (isEH)
67 Flavour = DWARFFlavour::X86_32_DarwinEH;
68 else
69 Flavour = DWARFFlavour::X86_32_Generic;
6770 } else if (Subtarget->isTargetCygMing()) {
6871 // Unsupported by now, just quick fallback
69 Flavour = DWARFFlavour::X86_32_ELF;
72 Flavour = DWARFFlavour::X86_32_Generic;
7073 } else {
71 Flavour = DWARFFlavour::X86_32_ELF;
74 Flavour = DWARFFlavour::X86_32_Generic;
7275 }
7376 }
7477
3535 ///
3636 namespace DWARFFlavour {
3737 enum {
38 X86_64 = 0, X86_32_Darwin = 1, X86_32_ELF = 2
38 X86_64 = 0, X86_32_DarwinEH = 1, X86_32_Generic = 2
3939 };
4040 }
4141
2424
2525 // Dwarf numbering is different for 32-bit and 64-bit, and there are
2626 // variations by target as well. Currently the first entry is for X86-64,
27 // second - for X86-32/Darwin and third for X86-32/Linux
28
29 // FIXME: Comments in gcc indicate that Darwin uses different numbering
30 // for debug info and exception handling info:( The numbering here is
31 // for exception handling.
27 // second - for EH on X86-32/Darwin and third is 'generic' one (X86-32/Linux
28 // and debug information on X86-32/Darwin)
3229
3330 // 8-bit registers
3431 // Low registers