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
5 # XXX NOTE: neither of these are actually used at present other than regspecs
6 # TODO: make use of them in LDSTCompUnit (somehow)
8 class LDSTInputData(FUBaseData
):
9 regspec
= [('INT', 'ra', '0:63'), # RA
10 ('INT', 'rb', '0:63'), # RB/immediate
11 ('INT', 'rc', '0:63'), # RC
12 # XXX TODO, later ('XER', 'xer_so', '32') # XER bit 32: SO
14 def __init__(self
, pspec
):
15 super().__init
__(pspec
, False)
20 class LDSTOutputData(FUBaseData
):
21 # these need to tie up with LDSTCompUnit.get_out index numbers
22 # LDSTCompUnit is unusual in that it's non-standard to RegSpecAPI
23 regspec
= [('INT', 'o', '0:63'), # RT
24 ('INT', 'o1', '0:63'), # RA (effective address, update mode)
25 ('CR', 'cr_a', '0:3'),
26 # TODO, later ('XER', 'xer_so', '32')
28 def __init__(self
, pspec
):
29 super().__init
__(pspec
, True, LDSTException
)
31 self
.cr0
, self
.ea
= self
.cr_a
, self
.o1
34 class LDSTPipeSpec(CommonPipeSpec
):
35 regspecklses
= (LDSTInputData
, LDSTOutputData
)
36 opsubsetkls
= CompLDSTOpSubset