3 * register content classes
5 * Copyright IBM Corp. 2004, 2006.
7 * Author(s): Michael Holzheu
11 #include "register_content.h"
14 RegisterContent32::RegisterContent32(void)
15 : regSets(), nrCpus(0)
19 RegisterContent32::RegisterContent32(const RegisterContent32
& r
)
22 memcpy(®Sets
,&r
.regSets
,sizeof(regSets
));
26 RegisterContent32::addRegisterSet(const RegisterSet32
& rs
)
28 if(nrCpus
< MAX_CPUS
){
29 regSets
[nrCpus
++] = rs
;
31 throw(DumpException("RegisterContent32::addRegisterSet - "\
32 "No more register sets available"));
37 RegisterContent32::getRegisterSet(int cpu
){
41 throw(DumpException("RegisterContent32::getRegisterSet - "\
42 "No register set for cpu"));
46 RegisterContent64::RegisterContent64(void)
47 : regSets(), nrCpus(0)
51 RegisterContent64::RegisterContent64(const RegisterContent64
& r
)
54 memcpy(®Sets
,&r
.regSets
,sizeof(regSets
));
58 RegisterContent64::addRegisterSet(const RegisterSet64
& rs
)
60 if(nrCpus
< MAX_CPUS
){
61 regSets
[nrCpus
++] = rs
;
63 throw(DumpException("RegisterContent64::addRegisterSet - "\
64 "No more register sets available"));
69 RegisterContent64::getRegisterSet(int cpu
)
74 throw(DumpException("RegisterContent64::getRegisterSet - "\
75 "No register set for cpu"));