File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -783,8 +783,8 @@ void FASTCALL decodeCallPattern(int pattern,
783
783
#define DENORMALIZE_STACK_SLOT (x ) ((x)<<3)
784
784
#define NORMALIZE_CODE_LENGTH (x ) ((x)>>2) // All Instructions are 4 bytes long
785
785
#define DENORMALIZE_CODE_LENGTH (x ) ((x)<<2)
786
- #define NORMALIZE_STACK_BASE_REGISTER (x ) ((x)^22 ) // Encode Frame pointer fp=$22 as zero
787
- #define DENORMALIZE_STACK_BASE_REGISTER (x ) ((x)^22 )
786
+ #define NORMALIZE_STACK_BASE_REGISTER (x ) ((x) == 22 ? 0 : 1 ) // Encode Frame pointer fp=$22 as zero
787
+ #define DENORMALIZE_STACK_BASE_REGISTER (x ) ((x) == 0 ? 22 : 3 )
788
788
#define NORMALIZE_SIZE_OF_STACK_AREA (x ) ((x)>>3)
789
789
#define DENORMALIZE_SIZE_OF_STACK_AREA (x ) ((x)<<3)
790
790
#define CODE_OFFSETS_NEED_NORMALIZATION 0
@@ -804,8 +804,7 @@ void FASTCALL decodeCallPattern(int pattern,
804
804
#define CODE_LENGTH_ENCBASE 8
805
805
#define SIZE_OF_RETURN_KIND_IN_SLIM_HEADER 2
806
806
#define SIZE_OF_RETURN_KIND_IN_FAT_HEADER 4
807
- ////TODO for LOONGARCH64.
808
- // FP/SP encoded as 0 or 2 ??
807
+ // FP/SP encoded as 0 or 1.
809
808
#define STACK_BASE_REGISTER_ENCBASE 2
810
809
#define SIZE_OF_STACK_AREA_ENCBASE 3
811
810
#define SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE 4
You can’t perform that action at this time.
0 commit comments