mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
Add support for Windows TLS
This commit is contained in:
parent
5e13d47e38
commit
6e1848cb40
12
ir_x86.dasc
12
ir_x86.dasc
@ -6993,7 +6993,17 @@ static void ir_emit_tls(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
return;
|
||||
}
|
||||
|
||||
|.if X64
|
||||
|.if X64WIN
|
||||
| gs
|
||||
| mov Ra(reg), aword [0x58]
|
||||
| mov Ra(reg), aword [Ra(reg)+insn->op2]
|
||||
| mov Ra(reg), aword [Ra(reg)+insn->op3]
|
||||
|.elif WIN
|
||||
| fs
|
||||
| mov Ra(reg), aword [0x2c]
|
||||
| mov Ra(reg), aword [Ra(reg)+insn->op2]
|
||||
| mov Ra(reg), aword [Ra(reg)+insn->op3]
|
||||
|.elif X64
|
||||
| fs
|
||||
|| if (!insn->op3) {
|
||||
| mov Ra(reg), aword [insn->op2]
|
||||
|
Loading…
Reference in New Issue
Block a user