-
Notifications
You must be signed in to change notification settings - Fork 201
Tls support for ELF and MachO #1174
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ pub fn expand_global_value( | |
global_type, | ||
readonly, | ||
} => load_addr(inst, func, base, offset, global_type, readonly, isa), | ||
ir::GlobalValueData::Symbol { .. } => symbol(inst, func, gv, isa), | ||
ir::GlobalValueData::Symbol { tls, .. } => symbol(inst, func, gv, isa, tls), | ||
} | ||
} | ||
|
||
|
@@ -123,7 +123,18 @@ fn load_addr( | |
} | ||
|
||
/// Expand a `global_value` instruction for a symbolic name global. | ||
fn symbol(inst: ir::Inst, func: &mut ir::Function, gv: ir::GlobalValue, isa: &dyn TargetIsa) { | ||
fn symbol( | ||
inst: ir::Inst, | ||
func: &mut ir::Function, | ||
gv: ir::GlobalValue, | ||
isa: &dyn TargetIsa, | ||
tls: bool, | ||
) { | ||
let ptr_ty = isa.pointer_type(); | ||
func.dfg.replace(inst).symbol_value(ptr_ty, gv); | ||
|
||
if tls { | ||
func.dfg.replace(inst).tls_value(ptr_ty, gv); | ||
} else { | ||
func.dfg.replace(inst).symbol_value(ptr_ty, gv); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of having a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} |
Uh oh!
There was an error while loading. Please reload this page.