mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Add fshl fshr + new optimizer.
This commit is contained in:
@@ -39,3 +39,23 @@ macro clz(i) @builtin
|
||||
{
|
||||
return $$clz(i);
|
||||
}
|
||||
|
||||
/**
|
||||
* @require types::is_intlike($typeof(hi)) && types::is_intlike($typeof(lo)) && types::is_intlike($typeof(shift)) `The input must be an integer or integer vector`
|
||||
* @require $typeof(hi).typeid == $typeof(lo).typeid `Hi and low arguments must have the same type`
|
||||
* @require $typeof(hi).typeid == $typeof(shift).typeid `The shift value must have the same type`
|
||||
**/
|
||||
macro fshl(hi, lo, shift) @builtin
|
||||
{
|
||||
return $$fshl(hi, lo, ($typeof(hi))shift);
|
||||
}
|
||||
|
||||
/**
|
||||
* @require types::is_intlike($typeof(hi)) && types::is_intlike($typeof(lo)) && types::is_intlike($typeof(shift)) `The input must be an integer or integer vector`
|
||||
* @require $typeof(hi).typeid == $typeof(lo).typeid `Hi and low arguments must have the same type`
|
||||
* @require $typeof(hi).typeid == $typeof(shift).typeid `The shift value must have the same type`
|
||||
**/
|
||||
macro fshr(hi, lo, shift) @builtin
|
||||
{
|
||||
return $$fshr(hi, lo, ($typeof(hi))shift);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user