generate_csr_locations.py: static const

This commit is contained in:
Peter McGoron 2023-04-08 16:45:48 +00:00
parent 5ff3ff675e
commit a57b4ca91b
1 changed files with 2 additions and 2 deletions

View File

@ -19,9 +19,9 @@ class CSRGenerator:
def print_array(self, name, num):
if num == 1:
self.print(f'uintptr_t {name} = {self.get_reg(name, None)};\n')
self.print(f'static const uintptr_t {name} = {self.get_reg(name, None)};\n')
else:
self.print(f'uintptr_t {name}[{num}] = {{', self.get_reg(name, 0))
self.print(f'static const uintptr_t {name}[{num}] = {{', self.get_reg(name, 0))
for i in range(1,num):
self.print(',', self.get_reg(name, i))
self.print('};\n\n')