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
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/MipsSEFrameLowering.cpp | ||
---|---|---|
342 ↗ | (On Diff #10888) | This seems like duplicated check, if the register is part of FGR64 class isn't then FP unit 64 bit? |
345 ↗ | (On Diff #10888) | Not sure you can simply add 1 to dwarf register number, but I may be wrong. |
351 ↗ | (On Diff #10888) | This seems to use same value for both true/false case. |
lib/Target/Mips/MipsSEFrameLowering.cpp | ||
---|---|---|
342 ↗ | (On Diff #10888) | 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 ↗ | (On Diff #10888) | 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 ↗ | (On Diff #11051) | 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 ↗ | (On Diff #11051) | |
test/CodeGen/Mips/cfi_offset.ll | ||
16–19 ↗ | (On Diff #11051) | 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 ↗ | (On Diff #11051) | 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 ↗ | (On Diff #11051) | 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. |