m5op_x86.S (9607:a54a4ef0f51d) | m5op_x86.S (9898:2935441b0870) |
---|---|
1/* 2 * Copyright (c) 2003-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: Gabe Black 29 * Nathan Binkert 30 * Ali Saidi 31 */ 32 33#include "m5ops.h" 34 | 1/* 2 * Copyright (c) 2003-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: Gabe Black 29 * Nathan Binkert 30 * Ali Saidi 31 */ 32 33#include "m5ops.h" 34 |
35#ifdef M5OP_ADDR 36/* Use the memory mapped m5op interface */ |
|
35#define TWO_BYTE_OP(name, number) \ 36 .globl name; \ 37 .func name; \ 38name: \ | 37#define TWO_BYTE_OP(name, number) \ 38 .globl name; \ 39 .func name; \ 40name: \ |
41 mov m5_mem, %r11; \ 42 mov $number, %rax; \ 43 shl $8, %rax; \ 44 mov 0(%r11, %rax, 1), %rax; \ 45 ret; \ 46 .endfunc; 47 48#else 49/* Use the magic instruction based m5op interface. This does not work 50 * in virtualized environments. 51 */ 52 53#define TWO_BYTE_OP(name, number) \ 54 .globl name; \ 55 .func name; \ 56name: \ |
|
39 .byte 0x0F, 0x04; \ 40 .word number; \ 41 ret; \ 42 .endfunc; 43 | 57 .byte 0x0F, 0x04; \ 58 .word number; \ 59 ret; \ 60 .endfunc; 61 |
62#endif 63 |
|
44TWO_BYTE_OP(arm, arm_func) 45TWO_BYTE_OP(quiesce, quiesce_func) 46TWO_BYTE_OP(quiesceNs, quiescens_func) 47TWO_BYTE_OP(quiesceCycle, quiescecycle_func) 48TWO_BYTE_OP(quiesceTime, quiescetime_func) 49TWO_BYTE_OP(rpns, rpns_func) 50TWO_BYTE_OP(m5_exit, exit_func) 51TWO_BYTE_OP(m5_fail, fail_func) --- 14 unchanged lines hidden --- | 64TWO_BYTE_OP(arm, arm_func) 65TWO_BYTE_OP(quiesce, quiesce_func) 66TWO_BYTE_OP(quiesceNs, quiescens_func) 67TWO_BYTE_OP(quiesceCycle, quiescecycle_func) 68TWO_BYTE_OP(quiesceTime, quiescetime_func) 69TWO_BYTE_OP(rpns, rpns_func) 70TWO_BYTE_OP(m5_exit, exit_func) 71TWO_BYTE_OP(m5_fail, fail_func) --- 14 unchanged lines hidden --- |