This patch implements emission of two CFI offset directives (.cfi_offset) per instruction in FR=1 mode (in FR=0 mode emission of two directives per SDC1/LDC1 is already supported). Also, this patch modifies CSR_O32_FP64 to use only even FPU registers as callee-saved. After I repair the patch for FPXX (D4293) I will add test cases for FPXX .cfi_offset as well.
Details
Diff Detail
Event Timeline
lib/Target/Mips/MipsSEFrameLowering.cpp | ||
---|---|---|
342 | Agreed. We only need to test for membership of FGR64RegClass. When !isFP64bit(), the register will never be in this class (it will be in AFGR64RegClass instead). | |
345 | I was wondering the same thing. DWARF register numbers are arbitrary but I would be surprised if we hadn't allocated them in contiguous blocks. It looks like it's ok though. According to MipsRegisterInfo.td we allocated a contiguous block starting at 32. |
In this patch I have removed STI.isFP64bit(), and I have added FPXX run lines in the test.
Returning _Complex float or _Complex double must reside in two even numbered registers and not even+odd registers.
lib/Target/Mips/MipsCallingConv.td | ||
---|---|---|
31 | I believe this is correct. I can only find this in the N32 documentation but O32, N32, and N64 all do the same thing in gcc. You need to update the comment above. It still says 'D1_64'. Also, please add a complex float and complex double test to test/CodeGen/Mips/cconv/return-hard-float.ll. | |
32 | ||
test/CodeGen/Mips/cfi_offset.ll | ||
16–19 | No FileCheck commands use the 'CHECK' prefix because specifying any prefixes removes the default. I think you want multiple prefixes on the FileCheck commands '--check-prefix=CHECK --check-prefix=CHECK-EB'. |
lib/Target/Mips/MipsCallingConv.td | ||
---|---|---|
32 | If this is an existing bug it may be worth leaving this part for the bug fixing phase, we are on a extremely tight schedule till tomorrow. |
lib/Target/Mips/MipsCallingConv.td | ||
---|---|---|
32 | Yes it's an existing bug. I mentioned it because the line above fixes the same bug for the -mfp64 case. Deferring it to another patch seems reasonable to me. |
I believe this is correct. I can only find this in the N32 documentation but O32, N32, and N64 all do the same thing in gcc.
You need to update the comment above. It still says 'D1_64'.
Also, please add a complex float and complex double test to test/CodeGen/Mips/cconv/return-hard-float.ll.