File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed
ILCompiler.ReadyToRun/ObjectWriter
ILCompiler.Reflection.ReadyToRun
libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public static TargetArchitecture GetTargetArchitecture(string token)
9696 Architecture . Arm => TargetArchitecture . ARM ,
9797 Architecture . Arm64 => TargetArchitecture . ARM64 ,
9898 Architecture . LoongArch64 => TargetArchitecture . LoongArch64 ,
99- ( Architecture ) 9 => TargetArchitecture . RiscV64 , /* TODO: update with Architecture.RiscV64 */
99+ Architecture . RiscV64 => TargetArchitecture . RiscV64 ,
100100 _ => throw new NotImplementedException ( )
101101 } ;
102102 }
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public static Machine MachineFromTarget(this TargetDetails target)
9191 return Machine . LoongArch64 ;
9292
9393 case Internal . TypeSystem . TargetArchitecture . RiscV64 :
94- return ( Machine ) 0x5064 ; /* TODO: update with RiscV64 */
94+ return Machine . RiscV64 ;
9595
9696 default :
9797 throw new NotImplementedException ( target . Architecture . ToString ( ) ) ;
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ internal GcInfoTypes(Machine machine)
154154 STACK_BASE_REGISTER_ENCBASE = 2 ;
155155 NUM_REGISTERS_ENCBASE = 3 ;
156156 break ;
157- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
157+ case Machine . RiscV64 :
158158 SIZE_OF_RETURN_KIND_FAT = 4 ;
159159 STACK_BASE_REGISTER_ENCBASE = 2 ;
160160 NUM_REGISTERS_ENCBASE = 3 ;
@@ -170,7 +170,7 @@ internal int DenormalizeCodeLength(int x)
170170 return ( x << 1 ) ;
171171 case Machine . Arm64 :
172172 case Machine . LoongArch64 :
173- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
173+ case Machine . RiscV64 :
174174 return ( x << 2 ) ;
175175 }
176176 return x ;
@@ -186,7 +186,7 @@ internal int DenormalizeStackSlot(int x)
186186 return ( x << 2 ) ;
187187 case Machine . Arm64 :
188188 case Machine . LoongArch64 :
189- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
189+ case Machine . RiscV64 :
190190 return ( x << 3 ) ;
191191 }
192192 return x ;
@@ -204,7 +204,7 @@ internal uint DenormalizeStackBaseRegister(uint x)
204204 return ( x ^ 29 ) ;
205205 case Machine . LoongArch64 :
206206 return ( ( x ^ 22 ) & 0x3 ) ;
207- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
207+ case Machine . RiscV64 :
208208 return ( x ^ 8 ) ;
209209 }
210210 return x ;
@@ -220,7 +220,7 @@ internal uint DenormalizeSizeOfStackArea(uint x)
220220 return ( x << 2 ) ;
221221 case Machine . Arm64 :
222222 case Machine . LoongArch64 :
223- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
223+ case Machine . RiscV64 :
224224 return ( x << 3 ) ;
225225 }
226226 return x ;
Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ private unsafe void EnsureHeader()
633633 case Machine . Amd64 :
634634 case Machine . Arm64 :
635635 case Machine . LoongArch64 :
636- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
636+ case Machine . RiscV64 :
637637 _pointerSize = 8 ;
638638 break ;
639639
@@ -1417,7 +1417,7 @@ private void EnsureImportSections()
14171417 case Machine . Amd64 :
14181418 case Machine . Arm64 :
14191419 case Machine . LoongArch64 :
1420- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
1420+ case Machine . RiscV64 :
14211421 entrySize = 8 ;
14221422 break ;
14231423
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public static TransitionBlock FromReader(ReadyToRunReader reader)
3434 case Machine . LoongArch64 :
3535 return LoongArch64TransitionBlock . Instance ;
3636
37- case ( Machine ) 0x5064 : /* TODO: update with RiscV64 */
37+ case Machine . RiscV64 :
3838 return RiscV64TransitionBlock . Instance ;
3939
4040 default :
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public static PEHeaderBuilder CreateLibraryHeader()
105105 return new PEHeaderBuilder ( imageCharacteristics : Characteristics . ExecutableImage | Characteristics . Dll ) ;
106106 }
107107
108- internal bool Is32Bit => Machine != Machine . Amd64 && Machine != Machine . IA64 && Machine != Machine . Arm64 && Machine != ( Machine ) 0x5064 ; /* TODO: update with RiscV64 */
108+ internal bool Is32Bit => Machine != Machine . Amd64 && Machine != Machine . IA64 && Machine != Machine . Arm64 && Machine != Machine . RiscV64 ;
109109
110110 internal int ComputeSizeOfPEHeaders ( int sectionCount ) =>
111111 PEBuilder . DosHeaderSize +
You can’t perform that action at this time.
0 commit comments