Commit e0e0c95
Fix LIR stack slot formatting and parsing
Summary:
Claude came up with this, but it doesn't impact anything, but it says it's right.
Fix the PhyLocation::toString() output format for stack slots and the
corresponding LIR parser to use a consistent sign convention.
Stack slot locations are stored as negative offsets from the frame pointer.
Previously toString() printed them as raw negative values inside parens
(e.g. "[RBP(-8)]") which didn't match the parser's regex for stack slots.
Change toString() to print "[RBP - 8]" format (negating the stored value)
and fix the parser to negate token.data when setting stack slots, so the
round-trip through print/parse is consistent.
Reviewed By: alexmalyshev
Differential Revision: D98161190
fbshipit-source-id: 83bd3ff43e211a3b0f4109da2c41c7302433e0a71 parent 23c01db commit e0e0c95
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments