From d9be0c189a9a9b77a6bf4501f8891544b8ce9593 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 28 Dec 2017 13:21:46 -0800 Subject: RISC-V: Add missing privileged spec registers. gas/ * testsuite/gas/riscv/priv-reg.d, testsuite/gas/riscv/priv-reg.s: New. include/ * opcode/riscv-opc.h (DECLARE_CSR): Add missing privileged registers. Sort to match privileged spec documentation order. (DECLARE_CSR_ALIAS): Add ubadaddr, and comments. --- gas/ChangeLog | 4 + gas/testsuite/gas/riscv/priv-reg.d | 251 ++++++++++++++++++++++++++++++++++ gas/testsuite/gas/riscv/priv-reg.s | 267 +++++++++++++++++++++++++++++++++++++ 3 files changed, 522 insertions(+) create mode 100644 gas/testsuite/gas/riscv/priv-reg.d create mode 100644 gas/testsuite/gas/riscv/priv-reg.s (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 3d12e93..eeeff51 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2017-12-28 Jim Wilson + + * testsuite/gas/riscv/priv-reg.d, testsuite/gas/riscv/priv-reg.s: New. + 2017-12-20 Jim Wilson * config/tc-riscv.c (risc_ip) : Add comment. diff --git a/gas/testsuite/gas/riscv/priv-reg.d b/gas/testsuite/gas/riscv/priv-reg.d new file mode 100644 index 0000000..2a650df --- /dev/null +++ b/gas/testsuite/gas/riscv/priv-reg.d @@ -0,0 +1,251 @@ +#as: -march=rv32i +#objdump: -dr + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 <.text>: +[ ]+0:[ ]+00002573[ ]+csrr[ ]+a0,ustatus +[ ]+4:[ ]+00402573[ ]+csrr[ ]+a0,uie +[ ]+8:[ ]+00502573[ ]+csrr[ ]+a0,utvec +[ ]+c:[ ]+04002573[ ]+csrr[ ]+a0,uscratch +[ ]+10:[ ]+04102573[ ]+csrr[ ]+a0,uepc +[ ]+14:[ ]+04202573[ ]+csrr[ ]+a0,ucause +[ ]+18:[ ]+04302573[ ]+csrr[ ]+a0,utval +[ ]+1c:[ ]+04402573[ ]+csrr[ ]+a0,uip +[ ]+20:[ ]+00102573[ ]+frflags[ ]+a0 +[ ]+24:[ ]+00202573[ ]+frrm[ ]+a0 +[ ]+28:[ ]+00302573[ ]+frsr[ ]+a0 +[ ]+2c:[ ]+c0002573[ ]+rdcycle[ ]+a0 +[ ]+30:[ ]+c0102573[ ]+rdtime[ ]+a0 +[ ]+34:[ ]+c0202573[ ]+rdinstret[ ]+a0 +[ ]+38:[ ]+c0302573[ ]+csrr[ ]+a0,hpmcounter3 +[ ]+3c:[ ]+c0402573[ ]+csrr[ ]+a0,hpmcounter4 +[ ]+40:[ ]+c0502573[ ]+csrr[ ]+a0,hpmcounter5 +[ ]+44:[ ]+c0602573[ ]+csrr[ ]+a0,hpmcounter6 +[ ]+48:[ ]+c0702573[ ]+csrr[ ]+a0,hpmcounter7 +[ ]+4c:[ ]+c0802573[ ]+csrr[ ]+a0,hpmcounter8 +[ ]+50:[ ]+c0902573[ ]+csrr[ ]+a0,hpmcounter9 +[ ]+54:[ ]+c0a02573[ ]+csrr[ ]+a0,hpmcounter10 +[ ]+58:[ ]+c0b02573[ ]+csrr[ ]+a0,hpmcounter11 +[ ]+5c:[ ]+c0c02573[ ]+csrr[ ]+a0,hpmcounter12 +[ ]+60:[ ]+c0d02573[ ]+csrr[ ]+a0,hpmcounter13 +[ ]+64:[ ]+c0e02573[ ]+csrr[ ]+a0,hpmcounter14 +[ ]+68:[ ]+c0f02573[ ]+csrr[ ]+a0,hpmcounter15 +[ ]+6c:[ ]+c1002573[ ]+csrr[ ]+a0,hpmcounter16 +[ ]+70:[ ]+c1102573[ ]+csrr[ ]+a0,hpmcounter17 +[ ]+74:[ ]+c1202573[ ]+csrr[ ]+a0,hpmcounter18 +[ ]+78:[ ]+c1302573[ ]+csrr[ ]+a0,hpmcounter19 +[ ]+7c:[ ]+c1402573[ ]+csrr[ ]+a0,hpmcounter20 +[ ]+80:[ ]+c1502573[ ]+csrr[ ]+a0,hpmcounter21 +[ ]+84:[ ]+c1602573[ ]+csrr[ ]+a0,hpmcounter22 +[ ]+88:[ ]+c1702573[ ]+csrr[ ]+a0,hpmcounter23 +[ ]+8c:[ ]+c1802573[ ]+csrr[ ]+a0,hpmcounter24 +[ ]+90:[ ]+c1902573[ ]+csrr[ ]+a0,hpmcounter25 +[ ]+94:[ ]+c1a02573[ ]+csrr[ ]+a0,hpmcounter26 +[ ]+98:[ ]+c1b02573[ ]+csrr[ ]+a0,hpmcounter27 +[ ]+9c:[ ]+c1c02573[ ]+csrr[ ]+a0,hpmcounter28 +[ ]+a0:[ ]+c1d02573[ ]+csrr[ ]+a0,hpmcounter29 +[ ]+a4:[ ]+c1e02573[ ]+csrr[ ]+a0,hpmcounter30 +[ ]+a8:[ ]+c1f02573[ ]+csrr[ ]+a0,hpmcounter31 +[ ]+ac:[ ]+c8002573[ ]+rdcycleh[ ]+a0 +[ ]+b0:[ ]+c8102573[ ]+rdtimeh[ ]+a0 +[ ]+b4:[ ]+c8202573[ ]+rdinstreth[ ]+a0 +[ ]+b8:[ ]+c8302573[ ]+csrr[ ]+a0,hpmcounter3h +[ ]+bc:[ ]+c8402573[ ]+csrr[ ]+a0,hpmcounter4h +[ ]+c0:[ ]+c8502573[ ]+csrr[ ]+a0,hpmcounter5h +[ ]+c4:[ ]+c8602573[ ]+csrr[ ]+a0,hpmcounter6h +[ ]+c8:[ ]+c8702573[ ]+csrr[ ]+a0,hpmcounter7h +[ ]+cc:[ ]+c8802573[ ]+csrr[ ]+a0,hpmcounter8h +[ ]+d0:[ ]+c8902573[ ]+csrr[ ]+a0,hpmcounter9h +[ ]+d4:[ ]+c8a02573[ ]+csrr[ ]+a0,hpmcounter10h +[ ]+d8:[ ]+c8b02573[ ]+csrr[ ]+a0,hpmcounter11h +[ ]+dc:[ ]+c8c02573[ ]+csrr[ ]+a0,hpmcounter12h +[ ]+e0:[ ]+c8d02573[ ]+csrr[ ]+a0,hpmcounter13h +[ ]+e4:[ ]+c8e02573[ ]+csrr[ ]+a0,hpmcounter14h +[ ]+e8:[ ]+c8f02573[ ]+csrr[ ]+a0,hpmcounter15h +[ ]+ec:[ ]+c9002573[ ]+csrr[ ]+a0,hpmcounter16h +[ ]+f0:[ ]+c9102573[ ]+csrr[ ]+a0,hpmcounter17h +[ ]+f4:[ ]+c9202573[ ]+csrr[ ]+a0,hpmcounter18h +[ ]+f8:[ ]+c9302573[ ]+csrr[ ]+a0,hpmcounter19h +[ ]+fc:[ ]+c9402573[ ]+csrr[ ]+a0,hpmcounter20h +[ ]+100:[ ]+c9502573[ ]+csrr[ ]+a0,hpmcounter21h +[ ]+104:[ ]+c9602573[ ]+csrr[ ]+a0,hpmcounter22h +[ ]+108:[ ]+c9702573[ ]+csrr[ ]+a0,hpmcounter23h +[ ]+10c:[ ]+c9802573[ ]+csrr[ ]+a0,hpmcounter24h +[ ]+110:[ ]+c9902573[ ]+csrr[ ]+a0,hpmcounter25h +[ ]+114:[ ]+c9a02573[ ]+csrr[ ]+a0,hpmcounter26h +[ ]+118:[ ]+c9b02573[ ]+csrr[ ]+a0,hpmcounter27h +[ ]+11c:[ ]+c9c02573[ ]+csrr[ ]+a0,hpmcounter28h +[ ]+120:[ ]+c9d02573[ ]+csrr[ ]+a0,hpmcounter29h +[ ]+124:[ ]+c9e02573[ ]+csrr[ ]+a0,hpmcounter30h +[ ]+128:[ ]+c9f02573[ ]+csrr[ ]+a0,hpmcounter31h +[ ]+12c:[ ]+10002573[ ]+csrr[ ]+a0,sstatus +[ ]+130:[ ]+10202573[ ]+csrr[ ]+a0,sedeleg +[ ]+134:[ ]+10302573[ ]+csrr[ ]+a0,sideleg +[ ]+138:[ ]+10402573[ ]+csrr[ ]+a0,sie +[ ]+13c:[ ]+10502573[ ]+csrr[ ]+a0,stvec +[ ]+140:[ ]+14002573[ ]+csrr[ ]+a0,sscratch +[ ]+144:[ ]+14102573[ ]+csrr[ ]+a0,sepc +[ ]+148:[ ]+14202573[ ]+csrr[ ]+a0,scause +[ ]+14c:[ ]+14302573[ ]+csrr[ ]+a0,sbadaddr +[ ]+150:[ ]+14402573[ ]+csrr[ ]+a0,sip +[ ]+154:[ ]+18002573[ ]+csrr[ ]+a0,satp +[ ]+158:[ ]+20002573[ ]+csrr[ ]+a0,hstatus +[ ]+15c:[ ]+20202573[ ]+csrr[ ]+a0,hedeleg +[ ]+160:[ ]+20302573[ ]+csrr[ ]+a0,hideleg +[ ]+164:[ ]+20402573[ ]+csrr[ ]+a0,hie +[ ]+168:[ ]+20502573[ ]+csrr[ ]+a0,htvec +[ ]+16c:[ ]+24002573[ ]+csrr[ ]+a0,hscratch +[ ]+170:[ ]+24102573[ ]+csrr[ ]+a0,hepc +[ ]+174:[ ]+24202573[ ]+csrr[ ]+a0,hcause +[ ]+178:[ ]+24302573[ ]+csrr[ ]+a0,hbadaddr +[ ]+17c:[ ]+24402573[ ]+csrr[ ]+a0,hip +[ ]+180:[ ]+f1102573[ ]+csrr[ ]+a0,mvendorid +[ ]+184:[ ]+f1202573[ ]+csrr[ ]+a0,marchid +[ ]+188:[ ]+f1302573[ ]+csrr[ ]+a0,mimpid +[ ]+18c:[ ]+f1402573[ ]+csrr[ ]+a0,mhartid +[ ]+190:[ ]+30002573[ ]+csrr[ ]+a0,mstatus +[ ]+194:[ ]+30102573[ ]+csrr[ ]+a0,misa +[ ]+198:[ ]+30202573[ ]+csrr[ ]+a0,medeleg +[ ]+19c:[ ]+30302573[ ]+csrr[ ]+a0,mideleg +[ ]+1a0:[ ]+30402573[ ]+csrr[ ]+a0,mie +[ ]+1a4:[ ]+30502573[ ]+csrr[ ]+a0,mtvec +[ ]+1a8:[ ]+34002573[ ]+csrr[ ]+a0,mscratch +[ ]+1ac:[ ]+34102573[ ]+csrr[ ]+a0,mepc +[ ]+1b0:[ ]+34202573[ ]+csrr[ ]+a0,mcause +[ ]+1b4:[ ]+34302573[ ]+csrr[ ]+a0,mbadaddr +[ ]+1b8:[ ]+34402573[ ]+csrr[ ]+a0,mip +[ ]+1bc:[ ]+38002573[ ]+csrr[ ]+a0,mbase +[ ]+1c0:[ ]+38102573[ ]+csrr[ ]+a0,mbound +[ ]+1c4:[ ]+38202573[ ]+csrr[ ]+a0,mibase +[ ]+1c8:[ ]+38302573[ ]+csrr[ ]+a0,mibound +[ ]+1cc:[ ]+38402573[ ]+csrr[ ]+a0,mdbase +[ ]+1d0:[ ]+38502573[ ]+csrr[ ]+a0,mdbound +[ ]+1d4:[ ]+b0002573[ ]+csrr[ ]+a0,mcycle +[ ]+1d8:[ ]+b0202573[ ]+csrr[ ]+a0,minstret +[ ]+1dc:[ ]+b0302573[ ]+csrr[ ]+a0,mhpmcounter3 +[ ]+1e0:[ ]+b0402573[ ]+csrr[ ]+a0,mhpmcounter4 +[ ]+1e4:[ ]+b0502573[ ]+csrr[ ]+a0,mhpmcounter5 +[ ]+1e8:[ ]+b0602573[ ]+csrr[ ]+a0,mhpmcounter6 +[ ]+1ec:[ ]+b0702573[ ]+csrr[ ]+a0,mhpmcounter7 +[ ]+1f0:[ ]+b0802573[ ]+csrr[ ]+a0,mhpmcounter8 +[ ]+1f4:[ ]+b0902573[ ]+csrr[ ]+a0,mhpmcounter9 +[ ]+1f8:[ ]+b0a02573[ ]+csrr[ ]+a0,mhpmcounter10 +[ ]+1fc:[ ]+b0b02573[ ]+csrr[ ]+a0,mhpmcounter11 +[ ]+200:[ ]+b0c02573[ ]+csrr[ ]+a0,mhpmcounter12 +[ ]+204:[ ]+b0d02573[ ]+csrr[ ]+a0,mhpmcounter13 +[ ]+208:[ ]+b0e02573[ ]+csrr[ ]+a0,mhpmcounter14 +[ ]+20c:[ ]+b0f02573[ ]+csrr[ ]+a0,mhpmcounter15 +[ ]+210:[ ]+b1002573[ ]+csrr[ ]+a0,mhpmcounter16 +[ ]+214:[ ]+b1102573[ ]+csrr[ ]+a0,mhpmcounter17 +[ ]+218:[ ]+b1202573[ ]+csrr[ ]+a0,mhpmcounter18 +[ ]+21c:[ ]+b1302573[ ]+csrr[ ]+a0,mhpmcounter19 +[ ]+220:[ ]+b1402573[ ]+csrr[ ]+a0,mhpmcounter20 +[ ]+224:[ ]+b1502573[ ]+csrr[ ]+a0,mhpmcounter21 +[ ]+228:[ ]+b1602573[ ]+csrr[ ]+a0,mhpmcounter22 +[ ]+22c:[ ]+b1702573[ ]+csrr[ ]+a0,mhpmcounter23 +[ ]+230:[ ]+b1802573[ ]+csrr[ ]+a0,mhpmcounter24 +[ ]+234:[ ]+b1902573[ ]+csrr[ ]+a0,mhpmcounter25 +[ ]+238:[ ]+b1a02573[ ]+csrr[ ]+a0,mhpmcounter26 +[ ]+23c:[ ]+b1b02573[ ]+csrr[ ]+a0,mhpmcounter27 +[ ]+240:[ ]+b1c02573[ ]+csrr[ ]+a0,mhpmcounter28 +[ ]+244:[ ]+b1d02573[ ]+csrr[ ]+a0,mhpmcounter29 +[ ]+248:[ ]+b1e02573[ ]+csrr[ ]+a0,mhpmcounter30 +[ ]+24c:[ ]+b1f02573[ ]+csrr[ ]+a0,mhpmcounter31 +[ ]+250:[ ]+b8002573[ ]+csrr[ ]+a0,mcycleh +[ ]+254:[ ]+b8202573[ ]+csrr[ ]+a0,minstreth +[ ]+258:[ ]+b8302573[ ]+csrr[ ]+a0,mhpmcounter3h +[ ]+25c:[ ]+b8402573[ ]+csrr[ ]+a0,mhpmcounter4h +[ ]+260:[ ]+b8502573[ ]+csrr[ ]+a0,mhpmcounter5h +[ ]+264:[ ]+b8602573[ ]+csrr[ ]+a0,mhpmcounter6h +[ ]+268:[ ]+b8702573[ ]+csrr[ ]+a0,mhpmcounter7h +[ ]+26c:[ ]+b8802573[ ]+csrr[ ]+a0,mhpmcounter8h +[ ]+270:[ ]+b8902573[ ]+csrr[ ]+a0,mhpmcounter9h +[ ]+274:[ ]+b8a02573[ ]+csrr[ ]+a0,mhpmcounter10h +[ ]+278:[ ]+b8b02573[ ]+csrr[ ]+a0,mhpmcounter11h +[ ]+27c:[ ]+b8c02573[ ]+csrr[ ]+a0,mhpmcounter12h +[ ]+280:[ ]+b8d02573[ ]+csrr[ ]+a0,mhpmcounter13h +[ ]+284:[ ]+b8e02573[ ]+csrr[ ]+a0,mhpmcounter14h +[ ]+288:[ ]+b8f02573[ ]+csrr[ ]+a0,mhpmcounter15h +[ ]+28c:[ ]+b9002573[ ]+csrr[ ]+a0,mhpmcounter16h +[ ]+290:[ ]+b9102573[ ]+csrr[ ]+a0,mhpmcounter17h +[ ]+294:[ ]+b9202573[ ]+csrr[ ]+a0,mhpmcounter18h +[ ]+298:[ ]+b9302573[ ]+csrr[ ]+a0,mhpmcounter19h +[ ]+29c:[ ]+b9402573[ ]+csrr[ ]+a0,mhpmcounter20h +[ ]+2a0:[ ]+b9502573[ ]+csrr[ ]+a0,mhpmcounter21h +[ ]+2a4:[ ]+b9602573[ ]+csrr[ ]+a0,mhpmcounter22h +[ ]+2a8:[ ]+b9702573[ ]+csrr[ ]+a0,mhpmcounter23h +[ ]+2ac:[ ]+b9802573[ ]+csrr[ ]+a0,mhpmcounter24h +[ ]+2b0:[ ]+b9902573[ ]+csrr[ ]+a0,mhpmcounter25h +[ ]+2b4:[ ]+b9a02573[ ]+csrr[ ]+a0,mhpmcounter26h +[ ]+2b8:[ ]+b9b02573[ ]+csrr[ ]+a0,mhpmcounter27h +[ ]+2bc:[ ]+b9c02573[ ]+csrr[ ]+a0,mhpmcounter28h +[ ]+2c0:[ ]+b9d02573[ ]+csrr[ ]+a0,mhpmcounter29h +[ ]+2c4:[ ]+b9e02573[ ]+csrr[ ]+a0,mhpmcounter30h +[ ]+2c8:[ ]+b9f02573[ ]+csrr[ ]+a0,mhpmcounter31h +[ ]+2cc:[ ]+32002573[ ]+csrr[ ]+a0,mucounteren +[ ]+2d0:[ ]+32102573[ ]+csrr[ ]+a0,mscounteren +[ ]+2d4:[ ]+32202573[ ]+csrr[ ]+a0,mhcounteren +[ ]+2d8:[ ]+32302573[ ]+csrr[ ]+a0,mhpmevent3 +[ ]+2dc:[ ]+32402573[ ]+csrr[ ]+a0,mhpmevent4 +[ ]+2e0:[ ]+32502573[ ]+csrr[ ]+a0,mhpmevent5 +[ ]+2e4:[ ]+32602573[ ]+csrr[ ]+a0,mhpmevent6 +[ ]+2e8:[ ]+32702573[ ]+csrr[ ]+a0,mhpmevent7 +[ ]+2ec:[ ]+32802573[ ]+csrr[ ]+a0,mhpmevent8 +[ ]+2f0:[ ]+32902573[ ]+csrr[ ]+a0,mhpmevent9 +[ ]+2f4:[ ]+32a02573[ ]+csrr[ ]+a0,mhpmevent10 +[ ]+2f8:[ ]+32b02573[ ]+csrr[ ]+a0,mhpmevent11 +[ ]+2fc:[ ]+32c02573[ ]+csrr[ ]+a0,mhpmevent12 +[ ]+300:[ ]+32d02573[ ]+csrr[ ]+a0,mhpmevent13 +[ ]+304:[ ]+32e02573[ ]+csrr[ ]+a0,mhpmevent14 +[ ]+308:[ ]+32f02573[ ]+csrr[ ]+a0,mhpmevent15 +[ ]+30c:[ ]+33002573[ ]+csrr[ ]+a0,mhpmevent16 +[ ]+310:[ ]+33102573[ ]+csrr[ ]+a0,mhpmevent17 +[ ]+314:[ ]+33202573[ ]+csrr[ ]+a0,mhpmevent18 +[ ]+318:[ ]+33302573[ ]+csrr[ ]+a0,mhpmevent19 +[ ]+31c:[ ]+33402573[ ]+csrr[ ]+a0,mhpmevent20 +[ ]+320:[ ]+33502573[ ]+csrr[ ]+a0,mhpmevent21 +[ ]+324:[ ]+33602573[ ]+csrr[ ]+a0,mhpmevent22 +[ ]+328:[ ]+33702573[ ]+csrr[ ]+a0,mhpmevent23 +[ ]+32c:[ ]+33802573[ ]+csrr[ ]+a0,mhpmevent24 +[ ]+330:[ ]+33902573[ ]+csrr[ ]+a0,mhpmevent25 +[ ]+334:[ ]+33a02573[ ]+csrr[ ]+a0,mhpmevent26 +[ ]+338:[ ]+33b02573[ ]+csrr[ ]+a0,mhpmevent27 +[ ]+33c:[ ]+33c02573[ ]+csrr[ ]+a0,mhpmevent28 +[ ]+340:[ ]+33d02573[ ]+csrr[ ]+a0,mhpmevent29 +[ ]+344:[ ]+33e02573[ ]+csrr[ ]+a0,mhpmevent30 +[ ]+348:[ ]+33f02573[ ]+csrr[ ]+a0,mhpmevent31 +[ ]+34c:[ ]+7a002573[ ]+csrr[ ]+a0,tselect +[ ]+350:[ ]+7a102573[ ]+csrr[ ]+a0,tdata1 +[ ]+354:[ ]+7a202573[ ]+csrr[ ]+a0,tdata2 +[ ]+358:[ ]+7a302573[ ]+csrr[ ]+a0,tdata3 +[ ]+35c:[ ]+7b002573[ ]+csrr[ ]+a0,dcsr +[ ]+360:[ ]+7b102573[ ]+csrr[ ]+a0,dpc +[ ]+364:[ ]+7b202573[ ]+csrr[ ]+a0,dscratch +[ ]+368:[ ]+04302573[ ]+csrr[ ]+a0,utval +[ ]+36c:[ ]+10602573[ ]+csrr[ ]+a0,scounteren +[ ]+370:[ ]+18002573[ ]+csrr[ ]+a0,satp +[ ]+374:[ ]+30602573[ ]+csrr[ ]+a0,mcounteren +[ ]+378:[ ]+3a002573[ ]+csrr[ ]+a0,pmpcfg0 +[ ]+37c:[ ]+3a102573[ ]+csrr[ ]+a0,pmpcfg1 +[ ]+380:[ ]+3a202573[ ]+csrr[ ]+a0,pmpcfg2 +[ ]+384:[ ]+3a302573[ ]+csrr[ ]+a0,pmpcfg3 +[ ]+388:[ ]+3b002573[ ]+csrr[ ]+a0,pmpaddr0 +[ ]+38c:[ ]+3b102573[ ]+csrr[ ]+a0,pmpaddr1 +[ ]+390:[ ]+3b202573[ ]+csrr[ ]+a0,pmpaddr2 +[ ]+394:[ ]+3b302573[ ]+csrr[ ]+a0,pmpaddr3 +[ ]+398:[ ]+3b402573[ ]+csrr[ ]+a0,pmpaddr4 +[ ]+39c:[ ]+3b502573[ ]+csrr[ ]+a0,pmpaddr5 +[ ]+3a0:[ ]+3b602573[ ]+csrr[ ]+a0,pmpaddr6 +[ ]+3a4:[ ]+3b702573[ ]+csrr[ ]+a0,pmpaddr7 +[ ]+3a8:[ ]+3b802573[ ]+csrr[ ]+a0,pmpaddr8 +[ ]+3ac:[ ]+3b902573[ ]+csrr[ ]+a0,pmpaddr9 +[ ]+3b0:[ ]+3ba02573[ ]+csrr[ ]+a0,pmpaddr10 +[ ]+3b4:[ ]+3bb02573[ ]+csrr[ ]+a0,pmpaddr11 +[ ]+3b8:[ ]+3bc02573[ ]+csrr[ ]+a0,pmpaddr12 +[ ]+3bc:[ ]+3bd02573[ ]+csrr[ ]+a0,pmpaddr13 +[ ]+3c0:[ ]+3be02573[ ]+csrr[ ]+a0,pmpaddr14 +[ ]+3c4:[ ]+3bf02573[ ]+csrr[ ]+a0,pmpaddr15 diff --git a/gas/testsuite/gas/riscv/priv-reg.s b/gas/testsuite/gas/riscv/priv-reg.s new file mode 100644 index 0000000..4774f36 --- /dev/null +++ b/gas/testsuite/gas/riscv/priv-reg.s @@ -0,0 +1,267 @@ + .macro csr val + csrr a0,\val + .endm +# 1.9.1 registers + csr ustatus + csr uie + csr utvec + + csr uscratch + csr uepc + csr ucause + csr ubadaddr + csr uip + + csr fflags + csr frm + csr fcsr + + csr cycle + csr time + csr instret + csr hpmcounter3 + csr hpmcounter4 + csr hpmcounter5 + csr hpmcounter6 + csr hpmcounter7 + csr hpmcounter8 + csr hpmcounter9 + csr hpmcounter10 + csr hpmcounter11 + csr hpmcounter12 + csr hpmcounter13 + csr hpmcounter14 + csr hpmcounter15 + csr hpmcounter16 + csr hpmcounter17 + csr hpmcounter18 + csr hpmcounter19 + csr hpmcounter20 + csr hpmcounter21 + csr hpmcounter22 + csr hpmcounter23 + csr hpmcounter24 + csr hpmcounter25 + csr hpmcounter26 + csr hpmcounter27 + csr hpmcounter28 + csr hpmcounter29 + csr hpmcounter30 + csr hpmcounter31 + csr cycleh + csr timeh + csr instreth + csr hpmcounter3h + csr hpmcounter4h + csr hpmcounter5h + csr hpmcounter6h + csr hpmcounter7h + csr hpmcounter8h + csr hpmcounter9h + csr hpmcounter10h + csr hpmcounter11h + csr hpmcounter12h + csr hpmcounter13h + csr hpmcounter14h + csr hpmcounter15h + csr hpmcounter16h + csr hpmcounter17h + csr hpmcounter18h + csr hpmcounter19h + csr hpmcounter20h + csr hpmcounter21h + csr hpmcounter22h + csr hpmcounter23h + csr hpmcounter24h + csr hpmcounter25h + csr hpmcounter26h + csr hpmcounter27h + csr hpmcounter28h + csr hpmcounter29h + csr hpmcounter30h + csr hpmcounter31h + + csr sstatus + csr sedeleg + csr sideleg + csr sie + csr stvec + + csr sscratch + csr sepc + csr scause + csr sbadaddr + csr sip + + csr sptbr + + csr hstatus + csr hedeleg + csr hideleg + csr hie + csr htvec + + csr hscratch + csr hepc + csr hcause + csr hbadaddr + csr hip + + csr mvendorid + csr marchid + csr mimpid + csr mhartid + + csr mstatus + csr misa + csr medeleg + csr mideleg + csr mie + csr mtvec + + csr mscratch + csr mepc + csr mcause + csr mbadaddr + csr mip + + csr mbase + csr mbound + csr mibase + csr mibound + csr mdbase + csr mdbound + + csr mcycle + csr minstret + csr mhpmcounter3 + csr mhpmcounter4 + csr mhpmcounter5 + csr mhpmcounter6 + csr mhpmcounter7 + csr mhpmcounter8 + csr mhpmcounter9 + csr mhpmcounter10 + csr mhpmcounter11 + csr mhpmcounter12 + csr mhpmcounter13 + csr mhpmcounter14 + csr mhpmcounter15 + csr mhpmcounter16 + csr mhpmcounter17 + csr mhpmcounter18 + csr mhpmcounter19 + csr mhpmcounter20 + csr mhpmcounter21 + csr mhpmcounter22 + csr mhpmcounter23 + csr mhpmcounter24 + csr mhpmcounter25 + csr mhpmcounter26 + csr mhpmcounter27 + csr mhpmcounter28 + csr mhpmcounter29 + csr mhpmcounter30 + csr mhpmcounter31 + csr mcycleh + csr minstreth + csr mhpmcounter3h + csr mhpmcounter4h + csr mhpmcounter5h + csr mhpmcounter6h + csr mhpmcounter7h + csr mhpmcounter8h + csr mhpmcounter9h + csr mhpmcounter10h + csr mhpmcounter11h + csr mhpmcounter12h + csr mhpmcounter13h + csr mhpmcounter14h + csr mhpmcounter15h + csr mhpmcounter16h + csr mhpmcounter17h + csr mhpmcounter18h + csr mhpmcounter19h + csr mhpmcounter20h + csr mhpmcounter21h + csr mhpmcounter22h + csr mhpmcounter23h + csr mhpmcounter24h + csr mhpmcounter25h + csr mhpmcounter26h + csr mhpmcounter27h + csr mhpmcounter28h + csr mhpmcounter29h + csr mhpmcounter30h + csr mhpmcounter31h + + csr mucounteren + csr mscounteren + csr mhcounteren + + csr mhpmevent3 + csr mhpmevent4 + csr mhpmevent5 + csr mhpmevent6 + csr mhpmevent7 + csr mhpmevent8 + csr mhpmevent9 + csr mhpmevent10 + csr mhpmevent11 + csr mhpmevent12 + csr mhpmevent13 + csr mhpmevent14 + csr mhpmevent15 + csr mhpmevent16 + csr mhpmevent17 + csr mhpmevent18 + csr mhpmevent19 + csr mhpmevent20 + csr mhpmevent21 + csr mhpmevent22 + csr mhpmevent23 + csr mhpmevent24 + csr mhpmevent25 + csr mhpmevent26 + csr mhpmevent27 + csr mhpmevent28 + csr mhpmevent29 + csr mhpmevent30 + csr mhpmevent31 + + csr tselect + csr tdata1 + csr tdata2 + csr tdata3 + + csr dcsr + csr dpc + csr dscratch +# 1.10 registers + csr utval + + csr scounteren + csr satp + + csr mcounteren + + csr pmpcfg0 + csr pmpcfg1 + csr pmpcfg2 + csr pmpcfg3 + csr pmpaddr0 + csr pmpaddr1 + csr pmpaddr2 + csr pmpaddr3 + csr pmpaddr4 + csr pmpaddr5 + csr pmpaddr6 + csr pmpaddr7 + csr pmpaddr8 + csr pmpaddr9 + csr pmpaddr10 + csr pmpaddr11 + csr pmpaddr12 + csr pmpaddr13 + csr pmpaddr14 + csr pmpaddr15 -- cgit v1.1