fb0b259e |
1 | /** @file\r |
2 | Definition of EBC Support function.\r |
53c71d09 |
3 | \r |
4 | Copyright (c) 2006, Intel Corporation\r |
5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r |
8 | http://opensource.org/licenses/bsd-license.php\r |
9 | \r |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
12 | \r |
fb0b259e |
13 | **/\r |
53c71d09 |
14 | \r |
15 | #ifndef _IPF_EBC_SUPPORT_H_\r |
16 | #define _IPF_EBC_SUPPORT_H_\r |
17 | \r |
18 | #define VM_STACK_SIZE (1024 * 32)\r |
19 | \r |
20 | #define EBC_THUNK_SIZE 128\r |
21 | #define STACK_REMAIN_SIZE (1024 * 4)\r |
22 | \r |
23 | //\r |
24 | // For code execution, thunks must be aligned on 16-byte boundary\r |
25 | //\r |
26 | #define EBC_THUNK_ALIGNMENT 16\r |
27 | \r |
28 | //\r |
29 | // Opcodes for IPF instructions. We'll need to hand-create thunk code (stuffing\r |
30 | // bits) to insert a jump to the interpreter.\r |
31 | //\r |
32 | #define OPCODE_NOP (UINT64) 0x00008000000\r |
33 | #define OPCODE_BR_COND_SPTK_FEW (UINT64) 0x00100000000\r |
34 | #define OPCODE_MOV_BX_RX (UINT64) 0x00E00100000\r |
35 | \r |
36 | //\r |
37 | // Opcode for MOVL instruction\r |
38 | //\r |
39 | #define MOVL_OPCODE 0x06\r |
40 | \r |
41 | VOID\r |
42 | EbcAsmLLCALLEX (\r |
43 | IN UINTN CallAddr,\r |
44 | IN UINTN EbcSp\r |
45 | );\r |
46 | \r |
47 | #endif\r |