1 from soc
.fu
.ldst
.ldst_input_record
import CompLDSTOpSubset
2 from soc
.fu
.pipe_data
import FUBaseData
, CommonPipeSpec
3 from openpower
.exceptions
import LDSTException
6 class LDSTInputData(FUBaseData
):
7 regspec
= [('INT', 'ra', '0:63'), # RA
8 ('INT', 'rb', '0:63'), # RB/immediate
9 ('INT', 'rc', '0:63'), # RC
10 # XXX TODO, later ('XER', 'xer_so', '32') # XER bit 32: SO
12 def __init__(self
, pspec
):
13 super().__init
__(pspec
, False)
18 class LDSTOutputData(FUBaseData
):
19 # these need to tie up with LDSTCompUnit.get_out index numbers
20 # LDSTCompUnit is unusual in that it's non-standard to RegSpecAPI
21 regspec
= [('INT', 'o', '0:63'), # RT
22 ('INT', 'o1', '0:63'), # RA (effective address, update mode)
23 # TODO, later ('CR', 'cr_a', '0:3'),
24 # TODO, later ('XER', 'xer_so', '32')
26 def __init__(self
, pspec
):
27 super().__init
__(pspec
, True, LDSTException
)
29 self
.cr0
, self
.ea
= self
.cr_a
, self
.o1
32 class LDSTPipeSpec(CommonPipeSpec
):
33 regspec
= (LDSTInputData
.regspec
, LDSTOutputData
.regspec
)
34 opsubsetkls
= CompLDSTOpSubset