MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / SetCW

Method SetCW

source/emulation/cpu/common/fpu.cpp:162–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void FPU::SetCW(U16 word) {
163 this->cw = word;
164 this->round = ((word >> 10) & 3);
165
166#ifdef LOG_FPU
167 const char* r;
168 switch (this->round) {
169 case ROUND_Nearest:
170 r = "Nearest";
171 break;
172 case ROUND_Down:
173 r = "Down";
174 break;
175 case ROUND_Up:
176 r = "Up";
177 break;
178 case ROUND_Chop:
179 r = "Chop";
180 break;
181 default:
182 r = "Unknown";
183 break;
184 }
185 fpuLogFile.write(" SetCW %X (%s)\n", word, r);
186#endif
187}
188
189#define FPU_SET_C0(fpu, C) (fpu)->sw &= ~0x0100; if (C != 0) (fpu)->sw |= 0x0100
190#define FPU_SET_C1(fpu, C) (fpu)->sw &= ~0x0200; if (C != 0) (fpu)->sw |= 0x0200

Callers 1

common_fxrstorFunction · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected