mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 13:17:34 -04:00
add abs
This commit is contained in:
@@ -270,6 +270,9 @@ std::shared_ptr<Form> IR_IntMath1::to_form(const LinkedObjectFile& file) const {
|
||||
case NOT:
|
||||
math_operator = "lognot";
|
||||
break;
|
||||
case ABS:
|
||||
math_operator = "abs.si";
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
}
|
||||
@@ -340,6 +343,9 @@ std::shared_ptr<Form> BranchDelay::to_form(const LinkedObjectFile& file) const {
|
||||
case DSLLV:
|
||||
return buildList(toForm("set!"), destination->to_form(file),
|
||||
buildList("shl", source->to_form(file), source2->to_form(file)));
|
||||
case NEGATE:
|
||||
return buildList(toForm("set!"), destination->to_form(file),
|
||||
buildList("-", source->to_form(file)));
|
||||
case UNKNOWN:
|
||||
return buildList("unknown-branch-delay");
|
||||
default:
|
||||
@@ -389,6 +395,7 @@ int Condition::num_args() const {
|
||||
case TRUTHY:
|
||||
case GREATER_THAN_ZERO_SIGNED:
|
||||
case GEQ_ZERO_SIGNED:
|
||||
case LESS_THAN_ZERO:
|
||||
return 1;
|
||||
case ALWAYS:
|
||||
return 0;
|
||||
@@ -474,6 +481,9 @@ std::shared_ptr<Form> Condition::to_form(const LinkedObjectFile& file) const {
|
||||
case GEQ_ZERO_SIGNED:
|
||||
condtion_operator = ">=0.si";
|
||||
break;
|
||||
case LESS_THAN_ZERO:
|
||||
condtion_operator = "<0.si";
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user