Changeset 159298 in webkit


Ignore:
Timestamp:
Nov 14, 2013 11:43:08 AM (10 years ago)
Author:
msaboff@apple.com
Message:

REGRESSION (r159276): Fix lots of crashes for arm_traditional architecture.
https://bugs.webkit.org/show_bug.cgi?id=124365

Reviewed by Oliver Hunt.

Crashes were caused by a mixup between regular registers and temporary registers in ARM_EXTRA_GPRS.

  • llint/LowLevelInterpreter32_64.asm: Warning, t3 != a3. It's safer to use an implementation using aX

registers like the MIPS one for cCallX macros.

  • offlineasm/arm.rb: Rearrange ARM_EXTRA_GPRS according to the new register distribution in LLINT.
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r159290 r159298  
     12013-11-14  Michael Saboff  <msaboff@apple.com>
     2
     3        REGRESSION (r159276): Fix lots of crashes for arm_traditional architecture.
     4        https://bugs.webkit.org/show_bug.cgi?id=124365
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Crashes were caused by a mixup between regular registers and temporary registers in ARM_EXTRA_GPRS.
     9
     10        * llint/LowLevelInterpreter32_64.asm: Warning, t3 != a3. It's safer to use an implementation using aX
     11        registers like the MIPS one for cCallX macros.
     12        * offlineasm/arm.rb: Rearrange ARM_EXTRA_GPRS according to the new register distribution in LLINT.
     13
    1142013-11-14  Michael Saboff  <msaboff@apple.com>
    215
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r159288 r159298  
    9898
    9999macro cCall2(function, arg1, arg2)
    100     if ARM or ARMv7 or ARMv7_TRADITIONAL
    101         move arg1, t0
    102         move arg2, t1
     100    if ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS
     101        move arg1, a0
     102        move arg2, a1
    103103        call function
    104104    elsif X86
    105105        poke arg1, 0
    106106        poke arg2, 1
    107         call function
    108     elsif MIPS
    109         move arg1, a0
    110         move arg2, a1
    111107        call function
    112108    elsif SH4
     
    122118# This barely works. arg3 and arg4 should probably be immediates.
    123119macro cCall4(function, arg1, arg2, arg3, arg4)
    124     if ARM or ARMv7 or ARMv7_TRADITIONAL
    125         move arg1, t0
    126         move arg2, t1
    127         move arg3, t2
    128         move arg4, t3
     120    if ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS
     121        move arg1, a0
     122        move arg2, a1
     123        move arg3, a2
     124        move arg4, a3
    129125        call function
    130126    elsif X86
     
    133129        poke arg3, 2
    134130        poke arg4, 3
    135         call function
    136     elsif MIPS
    137         move arg1, a0
    138         move arg2, a1
    139         move arg3, a2
    140         move arg4, a3
    141131        call function
    142132    elsif SH4
  • trunk/Source/JavaScriptCore/offlineasm/arm.rb

    r159276 r159298  
    6464end
    6565
    66 ARM_EXTRA_GPRS = [SpecialRegister.new("r9"), SpecialRegister.new("r8"), SpecialRegister.new("r3")]
     66ARM_EXTRA_GPRS = [SpecialRegister.new("r10"), SpecialRegister.new("r12")]
    6767ARM_EXTRA_FPRS = [SpecialRegister.new("d7")]
    6868ARM_SCRATCH_FPR = SpecialRegister.new("d6")
     
    224224        result = riscLowerMisplacedAddresses(result)
    225225        result = riscLowerRegisterReuse(result)
    226         result = assignRegistersToTemporaries(result, :gpr, ARM_EXTRA_GPRS)
     226        if isARMv7
     227            result = assignRegistersToTemporaries(result, :gpr, ARM_EXTRA_GPRS.concat([SpecialRegister.new("r11")]))
     228        else
     229            result = assignRegistersToTemporaries(result, :gpr, ARM_EXTRA_GPRS.concat([SpecialRegister.new("r7")]))
     230        end
    227231        result = assignRegistersToTemporaries(result, :fpr, ARM_EXTRA_FPRS)
    228232        return result
Note: See TracChangeset for help on using the changeset viewer.