This patch is for the implementation of mips16 complex pattern addr16.
authorReed Kotler <rkotler@mips.com>
Sun, 28 Oct 2012 06:02:37 +0000 (06:02 +0000)
committerReed Kotler <rkotler@mips.com>
Sun, 28 Oct 2012 06:02:37 +0000 (06:02 +0000)
commitf99998a2b0a6c186b3a1b6ad7bfa488009a0c5f5
tree84974b0efbe886c97e619015aa85e79164088863
parent163f67f4d98aab114cb9b04efd086f54f7688d0c
This patch is for the implementation of mips16 complex pattern addr16.
Previously mips16 was sharing the pattern addr which is used for mips32
and mips64. This had a number of problems:
1) Storing and loading byte and halfword quantities for mips16 has particular
problems due to the primarily non mips16 nature of SP. When we must
load/store byte/halfword stack objects in a function, we must create a mips16
alias register for SP. This functionality is tested in stchar.ll.
2) We need to have an FP register under certain conditions (such as
dynamically sized alloca). We use mips16 register S0 for this purpose.
In this case, we also use this register when accessing frame objects so this
issue also affects the complex pattern addr16. This functionality is
tested in alloca16.ll.

The Mips16InstrInfo.td has been updated to use addr16 instead of addr.

The complex pattern C++ function for addr has been copied to addr16 and
updated to reflect the above issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166897 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/Mips16FrameLowering.cpp
lib/Target/Mips/Mips16InstrInfo.td
lib/Target/Mips/Mips16RegisterInfo.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp
lib/Target/Mips/MipsMachineFunction.cpp
lib/Target/Mips/MipsMachineFunction.h
lib/Target/Mips/MipsRegisterInfo.cpp
test/CodeGen/Mips/alloca16.ll [new file with mode: 0644]
test/CodeGen/Mips/stchar.ll [new file with mode: 0644]