Changeset 158541 in webkit


Ignore:
Timestamp:
Nov 3, 2013 1:52:56 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Assertion failure in non-JIT'ed LLInt on ARM Thumb.
https://bugs.webkit.org/show_bug.cgi?id=97569.

Reviewed by Geoffrey Garen.

  • assembler/MacroAssemblerCodeRef.h:
  • Thumb2 alignment assertions do not apply to the C Loop LLINT because the arguments passed to those assertions are actually OpcodeIDs masquerading as addresses.
  • llint/LLIntOfflineAsmConfig.h:
  • Some of the #defines belong in the !ENABLE(LLINT_C_LOOP) section. Moving them there.
  • llint/LowLevelInterpreter.cpp:
  • Keep the compiler happy from some unreferenced C Loop labels.
Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r158535 r158541  
     12013-11-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Assertion failure in non-JIT'ed LLInt on ARM Thumb.
     4        https://bugs.webkit.org/show_bug.cgi?id=97569.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * assembler/MacroAssemblerCodeRef.h:
     9        - Thumb2 alignment assertions do not apply to the C Loop LLINT because
     10          the arguments passed to those assertions are actually OpcodeIDs
     11          masquerading as addresses.
     12        * llint/LLIntOfflineAsmConfig.h:
     13        - Some of the #defines belong in the !ENABLE(LLINT_C_LOOP) section.
     14          Moving them there.
     15        * llint/LowLevelInterpreter.cpp:
     16        - Keep the compiler happy from some unreferenced C Loop labels.
     17
    1182013-11-02  Filip Pizlo  <fpizlo@apple.com>
    219
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h

    r153228 r158541  
    3737// ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid
    3838// instruction address on the platform (for example, check any alignment requirements).
    39 #if CPU(ARM_THUMB2)
     39#if CPU(ARM_THUMB2) && !ENABLE(LLINT_C_LOOP)
    4040// ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded
    4141// into the processor are decorated with the bottom bit set, indicating that this is
  • trunk/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h

    r157474 r158541  
    3939#define OFFLINE_ASM_ARMv7 0
    4040#define OFFLINE_ASM_ARMv7_TRADITIONAL 0
     41#define OFFLINE_ASM_ARM64 0
    4142#define OFFLINE_ASM_X86_64 0
    4243#define OFFLINE_ASM_ARMv7s 0
     
    9798#endif
    9899
    99 #endif // !ENABLE(LLINT_C_LOOP)
    100 
    101100#if CPU(ARM64)
    102101#define OFFLINE_ASM_ARM64 1
     
    104103#define OFFLINE_ASM_ARM64 0
    105104#endif
     105
     106#if CPU(MIPS)
     107#ifdef WTF_MIPS_PIC
     108#define S(x) #x
     109#define SX(x) S(x)
     110#define OFFLINE_ASM_CPLOAD(reg) \
     111    ".set noreorder\n" \
     112    ".cpload " SX(reg) "\n" \
     113    ".set reorder\n"
     114#else
     115#define OFFLINE_ASM_CPLOAD(reg)
     116#endif
     117#endif
     118
     119#endif // !ENABLE(LLINT_C_LOOP)
    106120
    107121#if USE(JSVALUE64)
     
    147161#endif
    148162
    149 #if CPU(MIPS)
    150 #ifdef WTF_MIPS_PIC
    151 #define S(x) #x
    152 #define SX(x) S(x)
    153 #define OFFLINE_ASM_CPLOAD(reg) \
    154     ".set noreorder\n" \
    155     ".cpload " SX(reg) "\n" \
    156     ".set reorder\n"
    157 #else
    158 #define OFFLINE_ASM_CPLOAD(reg)
    159 #endif
    160 #endif
    161 
    162163#endif // LLIntOfflineAsmConfig_h
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp

    r157937 r158541  
    9191#define OFFLINE_ASM_END
    9292
    93 
    94 #define OFFLINE_ASM_OPCODE_LABEL(opcode) DEFINE_OPCODE(opcode)
     93// To keep compilers happy in case of unused labels, force usage of the label:
     94#define USE_LABEL(label) \
     95    do { \
     96        if (false) \
     97            goto label; \
     98    } while (false)
     99
     100#define OFFLINE_ASM_OPCODE_LABEL(opcode) DEFINE_OPCODE(opcode) USE_LABEL(opcode);
     101
    95102#if ENABLE(COMPUTED_GOTO_OPCODES)
    96     #define OFFLINE_ASM_GLUE_LABEL(label)  label:
     103#define OFFLINE_ASM_GLUE_LABEL(label)  label: USE_LABEL(label);
    97104#else
    98     #define OFFLINE_ASM_GLUE_LABEL(label)  case label: label:
    99 #endif
    100 
    101 #define OFFLINE_ASM_LOCAL_LABEL(label) \
    102     label: \
    103         if (false) \
    104             goto label;
     105#define OFFLINE_ASM_GLUE_LABEL(label)  case label: label: USE_LABEL(label);
     106#endif
     107
     108#define OFFLINE_ASM_LOCAL_LABEL(label) label: USE_LABEL(label);
    105109
    106110
Note: See TracChangeset for help on using the changeset viewer.