Commit 600f7533 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64] Port [fastcall] Support EnforceRange annotation

Port commit 8559a04f

Change-Id: Ibeafd18e3bed0907536b93d1fd4c5db98bef41ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746292
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81544}
parent 9723c929
......@@ -1268,6 +1268,36 @@ void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) {
VisitRR(this, kRiscvTruncWD, node);
}
void InstructionSelector::VisitTryTruncateFloat64ToInt32(Node* node) {
RiscvOperandGenerator g(this);
InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
InstructionOperand outputs[2];
size_t output_count = 0;
outputs[output_count++] = g.DefineAsRegister(node);
Node* success_output = NodeProperties::FindProjection(node, 1);
if (success_output) {
outputs[output_count++] = g.DefineAsRegister(success_output);
}
this->Emit(kRiscvTruncWD, output_count, outputs, 1, inputs);
}
void InstructionSelector::VisitTryTruncateFloat64ToUint32(Node* node) {
RiscvOperandGenerator g(this);
InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
InstructionOperand outputs[2];
size_t output_count = 0;
outputs[output_count++] = g.DefineAsRegister(node);
Node* success_output = NodeProperties::FindProjection(node, 1);
if (success_output) {
outputs[output_count++] = g.DefineAsRegister(success_output);
}
Emit(kRiscvTruncUwD, output_count, outputs, 1, inputs);
}
void InstructionSelector::VisitChangeFloat64ToInt64(Node* node) {
VisitRR(this, kRiscvTruncLD, node);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment