Ignore:
Timestamp:
Jun 1, 2020, 12:35:53 PM (5 years ago)
Author:
[email protected]
Message:

x86.rb's LabelReference.x86LoadOperand()'s address operand should be a pointer type.
https://bugs.webkit.org/show_bug.cgi?id=212603

Reviewed by Saam Barati.

The current implementation mistakenly sets the address type to that of the value
being loaded. I encountered this issue when I was trying to do a loadb from a
global address. Because of this bug, the emitted code was trying do a load using
%al (8 byte register) as the pointer to load from. With this fix, it now loads
from %rax.

  • offlineasm/x86.rb:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/x86.rb

    r252422 r262389  
    1 # Copyright (C) 2012-2018 Apple Inc. All rights reserved.
     1# Copyright (C) 2012-2020 Apple Inc. All rights reserved.
    22# Copyright (C) 2013 Digia Plc. and/or its subsidiary(-ies)
    33#
     
    448448            $asm.puts "lea #{dst.x86Operand(:ptr)}, #{asmLabel}"
    449449        end
    450         "#{offset}(#{dst.x86Operand(kind)})"
     450        "#{offset}(#{dst.x86Operand(:ptr)})"
    451451    end
    452452end
Note: See TracChangeset for help on using the changeset viewer.