Skip to content

Remove useless caller-saved float registers check#126

Draft
xtexx wants to merge 1 commit into
loongson:loongarch-portfrom
xtexx:false-float-check
Draft

Remove useless caller-saved float registers check#126
xtexx wants to merge 1 commit into
loongson:loongarch-portfrom
xtexx:false-float-check

Conversation

@xtexx
Copy link
Copy Markdown

@xtexx xtexx commented Jan 21, 2025

It never successes, because pd_last_callee_saved_fpu_reg is the same as pd_last_fpu_reg.
LoongArch ABI specified $f24-$f31 as callee-saved registers, while $f31 is also the last register. There is no hole between the last callee-saved float register and the last float register, so the check always evaluates to false.

Thanks to clang for finding this.

Fixes: 526ad75 ("Initial Linux/LoongArch64 Port")
Signed-off-by: Bingwu Zhang xtex@aosc.io

It never successes, because pd_last_callee_saved_fpu_reg is the same as
pd_last_fpu_reg.
LoongArch ABI specified $f24-$f31 as callee-saved registers, while $f31
is also the last register. There is no hole between the last callee-saved
float register and the last float register, so the check always
evaluates to false.

Thanks to clang for finding this.

Fixes: 526ad75 ("Initial Linux/LoongArch64 Port")
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
@xtexx xtexx force-pushed the false-float-check branch from 06404c9 to 5692a15 Compare March 1, 2025 04:01
@xtexx xtexx marked this pull request as draft March 1, 2025 04:08
@xtexx
Copy link
Copy Markdown
Author

xtexx commented Jan 31, 2026

#136 (comment)

@xtexx xtexx closed this Jan 31, 2026
@xtexx xtexx reopened this Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant