[llvm-commits] dwarf regnum for the x86 subregisters
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu May 26 18:46:31 PDT 2011
On May 26, 2011, at 4:31 PM, Devang Patel wrote:
>
> On May 26, 2011, at 3:28 PM, Rafael Avila de Espindola wrote:
>
>> I started working on PR9826. To fix it I need tblgen to produce a mapping from dwarf register number to llvm register number.
>>
>> I now know that this mapping cannot be unique because of cases like xmm0/ymm0. I will have to pick one (maybe the first one in the file?).
>>
>> Even ignoring cases like xmm0/ymm0, we still declare many duplicated dwarf numbers:
>>
>> def AH : Register<"ah">, DwarfRegNum<[0, 0, 0]>;
>> def AL : Register<"al">, DwarfRegNum<[0, 0, 0]>;
>> def AX : RegisterWithSubRegs<"ax", [AL,AH]>, DwarfRegNum<[0, 0, 0]>;
>> ...
>>
>> Are we doing the right thing in here? On the other end the debugger is going to map 0 to eax (or rax if in 64 bit mode). Should we refer to subregisters like AH with a DW_OP_bit_piece of EAX (or RAX if in 64 bit mode)?
>
> We should refer to sub registers with DW_OP_bit_piece...
PR9872 has an example where an 8-bit user variable ends up in bits 8-15 of %esi. That isn't even a sub-register. It would be nice if we could represent that as well.
/jakob
More information about the llvm-commits
mailing list