1 from soc
.fu
.ldst
.ldst_input_record
import CompLDSTOpSubset
2 from soc
.fu
.pipe_data
import IntegerData
, CommonPipeSpec
5 class LDSTInputData(IntegerData
):
6 regspec
= [('INT', 'ra', '0:63'), # RA
7 ('INT', 'rb', '0:63'), # RB/immediate
8 ('INT', 'rc', '0:63'), # RC
9 # XXX TODO, later ('XER', 'xer_so', '32') # XER bit 32: SO
11 def __init__(self
, pspec
):
12 super().__init
__(pspec
, False)
17 class LDSTOutputData(IntegerData
):
18 regspec
= [('INT', 'o', '0:63'), # RT
19 ('INT', 'o1', '0:63'), # RA (effective address, update mode)
20 # TODO, later ('CR', 'cr_a', '0:3'),
21 # TODO, later ('XER', 'xer_so', '32')
23 def __init__(self
, pspec
):
24 super().__init
__(pspec
, True)
26 self
.cr0
, self
.ea
= self
.cr_a
, self
.o1
29 class LDSTPipeSpec(CommonPipeSpec
):
30 regspec
= (LDSTInputData
.regspec
, LDSTOutputData
.regspec
)
31 opsubsetkls
= CompLDSTOpSubset