@@ -558,6 +558,35 @@ struct MappingGoAarch64 {
558
558
static const uptr kShadowAdd = 0x200000000000ull ;
559
559
};
560
560
561
+ /* Go on linux/loongarch64 (47-bit VMA)
562
+ 0000 0000 1000 - 0000 1000 0000: executable
563
+ 0000 1000 0000 - 00c0 0000 0000: -
564
+ 00c0 0000 0000 - 00e0 0000 0000: heap
565
+ 00e0 0000 0000 - 2000 0000 0000: -
566
+ 2000 0000 0000 - 2800 0000 0000: shadow
567
+ 2800 0000 0000 - 3000 0000 0000: -
568
+ 3000 0000 0000 - 3200 0000 0000: metainfo (memory blocks and sync objects)
569
+ 3200 0000 0000 - 8000 0000 0000: -
570
+ */
571
+ struct MappingGoLoongArch64_47 {
572
+ static const uptr kMetaShadowBeg = 0x300000000000ull ;
573
+ static const uptr kMetaShadowEnd = 0x320000000000ull ;
574
+ static const uptr kShadowBeg = 0x200000000000ull ;
575
+ static const uptr kShadowEnd = 0x280000000000ull ;
576
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
577
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
578
+ static const uptr kMidAppMemBeg = 0 ;
579
+ static const uptr kMidAppMemEnd = 0 ;
580
+ static const uptr kHiAppMemBeg = 0 ;
581
+ static const uptr kHiAppMemEnd = 0 ;
582
+ static const uptr kHeapMemBeg = 0 ;
583
+ static const uptr kHeapMemEnd = 0 ;
584
+ static const uptr kVdsoBeg = 0 ;
585
+ static const uptr kShadowMsk = 0 ;
586
+ static const uptr kShadowXor = 0 ;
587
+ static const uptr kShadowAdd = 0x200000000000ull ;
588
+ };
589
+
561
590
/*
562
591
Go on linux/mips64 (47-bit VMA)
563
592
0000 0000 1000 - 0000 1000 0000: executable
@@ -633,6 +662,8 @@ ALWAYS_INLINE auto SelectMapping(Arg arg) {
633
662
return Func::template Apply<MappingGoS390x>(arg);
634
663
# elif defined(__aarch64__)
635
664
return Func::template Apply<MappingGoAarch64>(arg);
665
+ # elif defined(__loongarch_lp64)
666
+ return Func::template Apply<MappingGoLoongArch64_47>(arg);
636
667
# elif SANITIZER_WINDOWS
637
668
return Func::template Apply<MappingGoWindows>(arg);
638
669
# else
@@ -692,6 +723,7 @@ void ForEachMapping() {
692
723
Func::template Apply<MappingGoPPC64_46>();
693
724
Func::template Apply<MappingGoPPC64_47>();
694
725
Func::template Apply<MappingGoAarch64>();
726
+ Func::template Apply<MappingGoLoongArch64_47>();
695
727
Func::template Apply<MappingGoMips64_47>();
696
728
Func::template Apply<MappingGoS390x>();
697
729
}
0 commit comments