Skip to content

Fix BC_UNM of 0 on s390x#259

Open
iii-i wants to merge 1 commit intoopenresty:v2.1-agentzhfrom
iii-i:s390x-bc-unm
Open

Fix BC_UNM of 0 on s390x#259
iii-i wants to merge 1 commit intoopenresty:v2.1-agentzhfrom
iii-i:s390x-bc-unm

Conversation

@iii-i
Copy link
Contributor

@iii-i iii-i commented Mar 11, 2026

Negation of 0 is -0, but currently BC_UNM produces 0. This is because 0 is stored as an integer (LJ_TISNUM) and handled using LOAD COMPLEMENT instruction, which operates on integers and thus has no concept of -0.

Fix by special-casing 0, like it's already done in the other JITs.

Negation of 0 is -0, but currently BC_UNM produces 0. This is because 0
is stored as an integer (LJ_TISNUM) and handled using LOAD COMPLEMENT
instruction, which operates on integers and thus has no concept of -0.

Fix by special-casing 0, like it's already done in the other JITs.
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