diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-13 19:39:55 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-13 19:39:55 +0000 |
| commit | 997b74ac6167d96631677884ece9cf90d896ac00 (patch) | |
| tree | 5c88bbaeb30477a19a3cf87f39f5ab13c2a5ac9f /llvm/lib | |
| parent | f807ccc58e739b9ebb2ca699fd627e130e8fae4e (diff) | |
| download | bcm5719-llvm-997b74ac6167d96631677884ece9cf90d896ac00.tar.gz bcm5719-llvm-997b74ac6167d96631677884ece9cf90d896ac00.zip | |
add 8 and 16 bit TLS moves.
add a fixme note on how to remove code duplication.
llvm-svn: 66932
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.td | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index 19703e9ce97..855d3b56112 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -2920,6 +2920,10 @@ def MOV32_mr : I<0x89, MRMDestMem, (outs), (ins i32mem:$dst, GR32_:$src), // Thread Local Storage Instructions // +// FIXME: there is duplication with the non-TLS case. +// There is a suggestion on how to fix this at +// http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090309/075212.html + let Uses = [EBX] in def TLS_addr32 : I<0, Pseudo, (outs GR32:$dst), (ins i32imm:$sym), "leal\t${sym:mem}(,%ebx,1), $dst", @@ -2938,6 +2942,22 @@ def TLS_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), SegGS; let AddedComplexity = 15 in +def TLS16_gs_ri : I<0x8B, Pseudo, (outs GR16:$dst), (ins i32imm:$src), + "movw\t%gs:${src:mem}, $dst", + [(set GR16:$dst, + (load (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + +let AddedComplexity = 15 in +def TLS8_gs_ri : I<0x8B, Pseudo, (outs GR8:$dst), (ins i32imm:$src), + "movb\t%gs:${src:mem}, $dst", + [(set GR8:$dst, + (load (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + +let AddedComplexity = 15 in def TLS_ext16_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), "movzwl\t%gs:${src:mem}, $dst", [(set GR32:$dst, |

