Tweak comments;

This commit is contained in:
Benjamin Bouvier
2019-08-27 17:04:04 +02:00
parent 47e5d6c83e
commit 44942a26a2
2 changed files with 2 additions and 2 deletions

View File

@@ -133,7 +133,7 @@ pub trait CodeSink {
/// Add a relocation referencing an external symbol plus the addend at the current offset. /// Add a relocation referencing an external symbol plus the addend at the current offset.
fn reloc_external(&mut self, _: Reloc, _: &ExternalName, _: Addend); fn reloc_external(&mut self, _: Reloc, _: &ExternalName, _: Addend);
/// Add a relocation referencing a jump table. /// Add a relocation referencing a constant.
fn reloc_constant(&mut self, _: Reloc, _: ConstantOffset); fn reloc_constant(&mut self, _: Reloc, _: ConstantOffset);
/// Add a relocation referencing a jump table. /// Add a relocation referencing a jump table.

View File

@@ -342,7 +342,7 @@ fn jt_disp4<CS: CodeSink + ?Sized>(jt: JumpTable, func: &Function, sink: &mut CS
sink.reloc_jt(Reloc::X86PCRelRodata4, jt); sink.reloc_jt(Reloc::X86PCRelRodata4, jt);
} }
/// Emit a four-byte displacement to `constant` /// Emit a four-byte displacement to `constant`.
fn const_disp4<CS: CodeSink + ?Sized>(constant: Constant, func: &Function, sink: &mut CS) { fn const_disp4<CS: CodeSink + ?Sized>(constant: Constant, func: &Function, sink: &mut CS) {
let offset = func.dfg.constants.get_offset(constant); let offset = func.dfg.constants.get_offset(constant);
let delta = offset.wrapping_sub(sink.offset() + 4); let delta = offset.wrapping_sub(sink.offset() + 4);