@@ -622,6 +622,35 @@ struct MappingGoAarch64 {
622
622
static const uptr kShadowAdd = 0x200000000000ull ;
623
623
};
624
624
625
+ /* Go on linux/loongarch64 (47-bit VMA)
626
+ 0000 0000 1000 - 0000 1000 0000: executable
627
+ 0000 1000 0000 - 00c0 0000 0000: -
628
+ 00c0 0000 0000 - 00e0 0000 0000: heap
629
+ 00e0 0000 0000 - 2000 0000 0000: -
630
+ 2000 0000 0000 - 2800 0000 0000: shadow
631
+ 2800 0000 0000 - 3000 0000 0000: -
632
+ 3000 0000 0000 - 3200 0000 0000: metainfo (memory blocks and sync objects)
633
+ 3200 0000 0000 - 8000 0000 0000: -
634
+ */
635
+ struct MappingGoLoongArch64_47 {
636
+ static const uptr kMetaShadowBeg = 0x300000000000ull ;
637
+ static const uptr kMetaShadowEnd = 0x320000000000ull ;
638
+ static const uptr kShadowBeg = 0x200000000000ull ;
639
+ static const uptr kShadowEnd = 0x280000000000ull ;
640
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
641
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
642
+ static const uptr kMidAppMemBeg = 0 ;
643
+ static const uptr kMidAppMemEnd = 0 ;
644
+ static const uptr kHiAppMemBeg = 0 ;
645
+ static const uptr kHiAppMemEnd = 0 ;
646
+ static const uptr kHeapMemBeg = 0 ;
647
+ static const uptr kHeapMemEnd = 0 ;
648
+ static const uptr kVdsoBeg = 0 ;
649
+ static const uptr kShadowMsk = 0 ;
650
+ static const uptr kShadowXor = 0 ;
651
+ static const uptr kShadowAdd = 0x200000000000ull ;
652
+ };
653
+
625
654
/*
626
655
Go on linux/mips64 (47-bit VMA)
627
656
0000 0000 1000 - 0000 1000 0000: executable
@@ -697,6 +726,8 @@ ALWAYS_INLINE auto SelectMapping(Arg arg) {
697
726
return Func::template Apply<MappingGoS390x>(arg);
698
727
# elif defined(__aarch64__)
699
728
return Func::template Apply<MappingGoAarch64>(arg);
729
+ # elif defined(__loongarch_lp64)
730
+ return Func::template Apply<MappingGoLoongArch64_47>(arg);
700
731
# elif SANITIZER_WINDOWS
701
732
return Func::template Apply<MappingGoWindows>(arg);
702
733
# else
@@ -765,6 +796,7 @@ void ForEachMapping() {
765
796
Func::template Apply<MappingGoPPC64_46>();
766
797
Func::template Apply<MappingGoPPC64_47>();
767
798
Func::template Apply<MappingGoAarch64>();
799
+ Func::template Apply<MappingGoLoongArch64_47>();
768
800
Func::template Apply<MappingGoMips64_47>();
769
801
Func::template Apply<MappingGoS390x>();
770
802
}
0 commit comments