Skip to content

Commit 07a842e

Browse files
committed
Give this function a better name.
1 parent c65cc8c commit 07a842e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/singlepass-backend/src/codegen_x64.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ impl X64FunctionCode {
16031603
) {
16041604
assert!(memory_sz <= stack_sz);
16051605

1606-
let compare = m.reserve_temp_gpr(GPR::RAX);
1606+
let compare = m.reserve_unused_temp_gpr(GPR::RAX);
16071607
let value = if loc == Location::GPR(GPR::R14) {
16081608
GPR::R13
16091609
} else {
@@ -6775,7 +6775,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
67756775
)[0];
67766776
self.value_stack.push(ret);
67776777

6778-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
6778+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
67796779
let value = if cmp == Location::GPR(GPR::R14) {
67806780
if new == Location::GPR(GPR::R13) {
67816781
GPR::R12
@@ -6824,7 +6824,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
68246824
)[0];
68256825
self.value_stack.push(ret);
68266826

6827-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
6827+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
68286828
let value = if cmp == Location::GPR(GPR::R14) {
68296829
if new == Location::GPR(GPR::R13) {
68306830
GPR::R12
@@ -6873,7 +6873,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
68736873
)[0];
68746874
self.value_stack.push(ret);
68756875

6876-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
6876+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
68776877
let value = if cmp == Location::GPR(GPR::R14) {
68786878
if new == Location::GPR(GPR::R13) {
68796879
GPR::R12
@@ -6922,7 +6922,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
69226922
)[0];
69236923
self.value_stack.push(ret);
69246924

6925-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
6925+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
69266926
let value = if cmp == Location::GPR(GPR::R14) {
69276927
if new == Location::GPR(GPR::R13) {
69286928
GPR::R12
@@ -6971,7 +6971,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
69716971
)[0];
69726972
self.value_stack.push(ret);
69736973

6974-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
6974+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
69756975
let value = if cmp == Location::GPR(GPR::R14) {
69766976
if new == Location::GPR(GPR::R13) {
69776977
GPR::R12
@@ -7020,7 +7020,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
70207020
)[0];
70217021
self.value_stack.push(ret);
70227022

7023-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
7023+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
70247024
let value = if cmp == Location::GPR(GPR::R14) {
70257025
if new == Location::GPR(GPR::R13) {
70267026
GPR::R12
@@ -7069,7 +7069,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
70697069
)[0];
70707070
self.value_stack.push(ret);
70717071

7072-
let compare = self.machine.reserve_temp_gpr(GPR::RAX);
7072+
let compare = self.machine.reserve_unused_temp_gpr(GPR::RAX);
70737073
let value = if cmp == Location::GPR(GPR::R14) {
70747074
if new == Location::GPR(GPR::R13) {
70757075
GPR::R12

lib/singlepass-backend/src/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl Machine {
8787
}
8888

8989
/// Specify that a given register is in use.
90-
pub fn reserve_temp_gpr(&mut self, gpr: GPR) -> GPR {
90+
pub fn reserve_unused_temp_gpr(&mut self, gpr: GPR) -> GPR {
9191
assert!(!self.used_gprs.contains(&gpr));
9292
self.used_gprs.insert(gpr);
9393
gpr

0 commit comments

Comments
 (0)