Implement intrinsic arith_offset
This commit is contained in:
parent
e1ac09a3f0
commit
742abd011b
1 changed files with 8 additions and 0 deletions
|
@ -379,6 +379,14 @@ pub fn codegen_call<'a, 'tcx: 'a>(
|
||||||
"assume" => {
|
"assume" => {
|
||||||
assert_eq!(args.len(), 1);
|
assert_eq!(args.len(), 1);
|
||||||
}
|
}
|
||||||
|
"arith_offset" => {
|
||||||
|
assert_eq!(args.len(), 2);
|
||||||
|
let base = args[0].load_value(fx);
|
||||||
|
let offset = args[1].load_value(fx);
|
||||||
|
let res = fx.bcx.ins().iadd(base, offset);
|
||||||
|
let res = CValue::ByVal(res, ret.layout());
|
||||||
|
ret.write_cvalue(fx, res);
|
||||||
|
}
|
||||||
"likely" | "unlikely" => {
|
"likely" | "unlikely" => {
|
||||||
assert_eq!(args.len(), 1);
|
assert_eq!(args.len(), 1);
|
||||||
ret.write_cvalue(fx, args[0]);
|
ret.write_cvalue(fx, args[0]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue