Revision 0633879f target-m68k/op.c
b/target-m68k/op.c | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* m68k micro operations |
3 | 3 |
* |
4 |
* Copyright (c) 2006 CodeSourcery |
|
4 |
* Copyright (c) 2006-2007 CodeSourcery
|
|
5 | 5 |
* Written by Paul Brook |
6 | 6 |
* |
7 | 7 |
* This library is free software; you can redistribute it and/or |
... | ... | |
86 | 86 |
} |
87 | 87 |
} |
88 | 88 |
|
89 |
#define OP(name) void OPPROTO op_##name (void)
|
|
89 |
#define OP(name) void OPPROTO glue(op_,name) (void)
|
|
90 | 90 |
|
91 | 91 |
OP(mov32) |
92 | 92 |
{ |
... | ... | |
316 | 316 |
FORCE_RET(); |
317 | 317 |
} |
318 | 318 |
|
319 |
/* Load/store ops. */ |
|
320 |
OP(ld8u32) |
|
321 |
{ |
|
322 |
uint32_t addr = get_op(PARAM2); |
|
323 |
set_op(PARAM1, ldub(addr)); |
|
324 |
FORCE_RET(); |
|
325 |
} |
|
326 |
|
|
327 |
OP(ld8s32) |
|
328 |
{ |
|
329 |
uint32_t addr = get_op(PARAM2); |
|
330 |
set_op(PARAM1, ldsb(addr)); |
|
331 |
FORCE_RET(); |
|
332 |
} |
|
333 |
|
|
334 |
OP(ld16u32) |
|
335 |
{ |
|
336 |
uint32_t addr = get_op(PARAM2); |
|
337 |
set_op(PARAM1, lduw(addr)); |
|
338 |
FORCE_RET(); |
|
339 |
} |
|
340 |
|
|
341 |
OP(ld16s32) |
|
342 |
{ |
|
343 |
uint32_t addr = get_op(PARAM2); |
|
344 |
set_op(PARAM1, ldsw(addr)); |
|
345 |
FORCE_RET(); |
|
346 |
} |
|
347 |
|
|
348 |
OP(ld32) |
|
349 |
{ |
|
350 |
uint32_t addr = get_op(PARAM2); |
|
351 |
set_op(PARAM1, ldl(addr)); |
|
352 |
FORCE_RET(); |
|
353 |
} |
|
354 |
|
|
355 |
OP(st8) |
|
356 |
{ |
|
357 |
uint32_t addr = get_op(PARAM1); |
|
358 |
stb(addr, get_op(PARAM2)); |
|
359 |
FORCE_RET(); |
|
360 |
} |
|
361 |
|
|
362 |
OP(st16) |
|
363 |
{ |
|
364 |
uint32_t addr = get_op(PARAM1); |
|
365 |
stw(addr, get_op(PARAM2)); |
|
366 |
FORCE_RET(); |
|
367 |
} |
|
368 |
|
|
369 |
OP(st32) |
|
370 |
{ |
|
371 |
uint32_t addr = get_op(PARAM1); |
|
372 |
stl(addr, get_op(PARAM2)); |
|
373 |
FORCE_RET(); |
|
374 |
} |
|
375 |
|
|
376 |
OP(ldf64) |
|
377 |
{ |
|
378 |
uint32_t addr = get_op(PARAM2); |
|
379 |
set_opf64(PARAM1, ldfq(addr)); |
|
380 |
FORCE_RET(); |
|
381 |
} |
|
382 |
|
|
383 |
OP(stf64) |
|
384 |
{ |
|
385 |
uint32_t addr = get_op(PARAM1); |
|
386 |
stfq(addr, get_opf64(PARAM2)); |
|
387 |
FORCE_RET(); |
|
388 |
} |
|
389 |
|
|
390 | 319 |
OP(flush_flags) |
391 | 320 |
{ |
392 | 321 |
int cc_op = PARAM1; |
... | ... | |
454 | 383 |
FORCE_RET(); |
455 | 384 |
} |
456 | 385 |
|
386 |
OP(halt) |
|
387 |
{ |
|
388 |
env->halted = 1; |
|
389 |
RAISE_EXCEPTION(EXCP_HLT); |
|
390 |
FORCE_RET(); |
|
391 |
} |
|
392 |
|
|
457 | 393 |
OP(raise_exception) |
458 | 394 |
{ |
459 | 395 |
RAISE_EXCEPTION(PARAM1); |
... | ... | |
679 | 615 |
set_op(PARAM1, float64_compare_quiet(op0, op1, &CPU_FP_STATUS)); |
680 | 616 |
FORCE_RET(); |
681 | 617 |
} |
618 |
|
|
619 |
OP(movec) |
|
620 |
{ |
|
621 |
int op1 = get_op(PARAM1); |
|
622 |
uint32_t op2 = get_op(PARAM2); |
|
623 |
helper_movec(env, op1, op2); |
|
624 |
} |
|
625 |
|
|
626 |
/* Memory access. */ |
|
627 |
|
|
628 |
#define MEMSUFFIX _raw |
|
629 |
#include "op_mem.h" |
|
630 |
|
|
631 |
#if !defined(CONFIG_USER_ONLY) |
|
632 |
#define MEMSUFFIX _user |
|
633 |
#include "op_mem.h" |
|
634 |
#define MEMSUFFIX _kernel |
|
635 |
#include "op_mem.h" |
|
636 |
#endif |
Also available in: Unified diff