Changeset 176095 in webkit for trunk/Source/JavaScriptCore/jit/JITStubsX86Common.h
- Timestamp:
- Nov 13, 2014, 3:00:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITStubsX86Common.h
r176031 r176095 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 51 51 #define PROBE_ARG2_OFFSET (2 * PTR_SIZE) 52 52 53 #define PROBE_CPU_EAX_OFFSET (4 * PTR_SIZE) 54 #define PROBE_CPU_EBX_OFFSET (5 * PTR_SIZE) 55 #define PROBE_CPU_ECX_OFFSET (6 * PTR_SIZE) 56 #define PROBE_CPU_EDX_OFFSET (7 * PTR_SIZE) 57 #define PROBE_CPU_ESI_OFFSET (8 * PTR_SIZE) 58 #define PROBE_CPU_EDI_OFFSET (9 * PTR_SIZE) 59 #define PROBE_CPU_EBP_OFFSET (10 * PTR_SIZE) 60 #define PROBE_CPU_ESP_OFFSET (11 * PTR_SIZE) 53 #define PROBE_FIRST_GPR_OFFSET (3 * PTR_SIZE) 54 #define PROBE_CPU_EAX_OFFSET (PROBE_FIRST_GPR_OFFSET + (0 * PTR_SIZE)) 55 #define PROBE_CPU_ECX_OFFSET (PROBE_FIRST_GPR_OFFSET + (1 * PTR_SIZE)) 56 #define PROBE_CPU_EDX_OFFSET (PROBE_FIRST_GPR_OFFSET + (2 * PTR_SIZE)) 57 #define PROBE_CPU_EBX_OFFSET (PROBE_FIRST_GPR_OFFSET + (3 * PTR_SIZE)) 58 #define PROBE_CPU_ESP_OFFSET (PROBE_FIRST_GPR_OFFSET + (4 * PTR_SIZE)) 59 #define PROBE_CPU_EBP_OFFSET (PROBE_FIRST_GPR_OFFSET + (5 * PTR_SIZE)) 60 #define PROBE_CPU_ESI_OFFSET (PROBE_FIRST_GPR_OFFSET + (6 * PTR_SIZE)) 61 #define PROBE_CPU_EDI_OFFSET (PROBE_FIRST_GPR_OFFSET + (7 * PTR_SIZE)) 61 62 62 63 #if CPU(X86) 63 #define PROBE_FIRST_SPECIAL_OFFSET ( 12 * PTR_SIZE)64 #define PROBE_FIRST_SPECIAL_OFFSET (PROBE_FIRST_GPR_OFFSET + (8 * PTR_SIZE)) 64 65 #else // CPU(X86_64) 65 #define PROBE_CPU_R8_OFFSET ( 12 * PTR_SIZE)66 #define PROBE_CPU_R9_OFFSET ( 13 * PTR_SIZE)67 #define PROBE_CPU_R10_OFFSET ( 14 * PTR_SIZE)68 #define PROBE_CPU_R11_OFFSET ( 15 * PTR_SIZE)69 #define PROBE_CPU_R12_OFFSET ( 16 * PTR_SIZE)70 #define PROBE_CPU_R13_OFFSET ( 17 * PTR_SIZE)71 #define PROBE_CPU_R14_OFFSET ( 18 * PTR_SIZE)72 #define PROBE_CPU_R15_OFFSET ( 19 * PTR_SIZE)73 #define PROBE_FIRST_SPECIAL_OFFSET ( 20 * PTR_SIZE)66 #define PROBE_CPU_R8_OFFSET (PROBE_FIRST_GPR_OFFSET + (8 * PTR_SIZE)) 67 #define PROBE_CPU_R9_OFFSET (PROBE_FIRST_GPR_OFFSET + (9 * PTR_SIZE)) 68 #define PROBE_CPU_R10_OFFSET (PROBE_FIRST_GPR_OFFSET + (10 * PTR_SIZE)) 69 #define PROBE_CPU_R11_OFFSET (PROBE_FIRST_GPR_OFFSET + (11 * PTR_SIZE)) 70 #define PROBE_CPU_R12_OFFSET (PROBE_FIRST_GPR_OFFSET + (12 * PTR_SIZE)) 71 #define PROBE_CPU_R13_OFFSET (PROBE_FIRST_GPR_OFFSET + (13 * PTR_SIZE)) 72 #define PROBE_CPU_R14_OFFSET (PROBE_FIRST_GPR_OFFSET + (14 * PTR_SIZE)) 73 #define PROBE_CPU_R15_OFFSET (PROBE_FIRST_GPR_OFFSET + (15 * PTR_SIZE)) 74 #define PROBE_FIRST_SPECIAL_OFFSET (PROBE_FIRST_GPR_OFFSET + (16 * PTR_SIZE)) 74 75 #endif // CPU(X86_64) 75 76 76 77 #define PROBE_CPU_EIP_OFFSET (PROBE_FIRST_SPECIAL_OFFSET + (0 * PTR_SIZE)) 77 78 #define PROBE_CPU_EFLAGS_OFFSET (PROBE_FIRST_SPECIAL_OFFSET + (1 * PTR_SIZE)) 79 #define PROBE_FIRST_XMM_OFFSET (PROBE_FIRST_SPECIAL_OFFSET + (2 * PTR_SIZE)) 78 80 79 #if CPU(X86) 80 #define PROBE_FIRST_XMM_OFFSET (PROBE_FIRST_SPECIAL_OFFSET + (4 * PTR_SIZE)) // After padding. 81 #else // CPU(X86_64) 82 #define PROBE_FIRST_XMM_OFFSET (PROBE_FIRST_SPECIAL_OFFSET + (2 * PTR_SIZE)) // After padding. 83 #endif // CPU(X86_64) 84 85 #define XMM_SIZE 16 81 #define XMM_SIZE 8 86 82 #define PROBE_CPU_XMM0_OFFSET (PROBE_FIRST_XMM_OFFSET + (0 * XMM_SIZE)) 87 83 #define PROBE_CPU_XMM1_OFFSET (PROBE_FIRST_XMM_OFFSET + (1 * XMM_SIZE)) … … 93 89 #define PROBE_CPU_XMM7_OFFSET (PROBE_FIRST_XMM_OFFSET + (7 * XMM_SIZE)) 94 90 91 #if CPU(X86) 95 92 #define PROBE_SIZE (PROBE_CPU_XMM7_OFFSET + XMM_SIZE) 93 #else // CPU(X86_64) 94 #define PROBE_CPU_XMM8_OFFSET (PROBE_FIRST_XMM_OFFSET + (8 * XMM_SIZE)) 95 #define PROBE_CPU_XMM9_OFFSET (PROBE_FIRST_XMM_OFFSET + (9 * XMM_SIZE)) 96 #define PROBE_CPU_XMM10_OFFSET (PROBE_FIRST_XMM_OFFSET + (10 * XMM_SIZE)) 97 #define PROBE_CPU_XMM11_OFFSET (PROBE_FIRST_XMM_OFFSET + (11 * XMM_SIZE)) 98 #define PROBE_CPU_XMM12_OFFSET (PROBE_FIRST_XMM_OFFSET + (12 * XMM_SIZE)) 99 #define PROBE_CPU_XMM13_OFFSET (PROBE_FIRST_XMM_OFFSET + (13 * XMM_SIZE)) 100 #define PROBE_CPU_XMM14_OFFSET (PROBE_FIRST_XMM_OFFSET + (14 * XMM_SIZE)) 101 #define PROBE_CPU_XMM15_OFFSET (PROBE_FIRST_XMM_OFFSET + (15 * XMM_SIZE)) 102 #define PROBE_SIZE (PROBE_CPU_XMM15_OFFSET + XMM_SIZE) 103 #endif // CPU(X86_64) 96 104 97 105 // These ASSERTs remind you that if you change the layout of ProbeContext, … … 133 141 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm7) == PROBE_CPU_XMM7_OFFSET, ProbeContext_cpu_xmm7_offset_matches_ctiMasmProbeTrampoline); 134 142 143 #if CPU(X86_64) 144 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm8) == PROBE_CPU_XMM8_OFFSET, ProbeContext_cpu_xmm8_offset_matches_ctiMasmProbeTrampoline); 145 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm9) == PROBE_CPU_XMM9_OFFSET, ProbeContext_cpu_xmm9_offset_matches_ctiMasmProbeTrampoline); 146 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm10) == PROBE_CPU_XMM10_OFFSET, ProbeContext_cpu_xmm10_offset_matches_ctiMasmProbeTrampoline); 147 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm11) == PROBE_CPU_XMM11_OFFSET, ProbeContext_cpu_xmm11_offset_matches_ctiMasmProbeTrampoline); 148 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm12) == PROBE_CPU_XMM12_OFFSET, ProbeContext_cpu_xmm12_offset_matches_ctiMasmProbeTrampoline); 149 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm13) == PROBE_CPU_XMM13_OFFSET, ProbeContext_cpu_xmm13_offset_matches_ctiMasmProbeTrampoline); 150 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm14) == PROBE_CPU_XMM14_OFFSET, ProbeContext_cpu_xmm14_offset_matches_ctiMasmProbeTrampoline); 151 COMPILE_ASSERT(PROBE_OFFSETOF(cpu.xmm15) == PROBE_CPU_XMM15_OFFSET, ProbeContext_cpu_xmm15_offset_matches_ctiMasmProbeTrampoline); 152 #endif // CPU(X86_64) 153 135 154 COMPILE_ASSERT(sizeof(MacroAssembler::ProbeContext) == PROBE_SIZE, ProbeContext_size_matches_ctiMasmProbeTrampoline); 136 155 137 // Also double check that the xmm registers are 16 byte (128-bit) aligned as138 // required by the movdqa instruction used in the trampoline.139 COMPILE_ASSERT(!(PROBE_OFFSETOF(cpu.xmm0) % 16), ProbeContext_xmm0_offset_not_aligned_properly);140 156 #undef PROBE_OFFSETOF 141 157
Note:
See TracChangeset
for help on using the changeset viewer.