Changeset 242215 in webkit
- Timestamp:
- Feb 28, 2019 12:48:50 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r242196 r242215 1 2019-02-28 Mark Lam <mark.lam@apple.com> 2 3 cloop.rb shift mask should depend on the word size being shifted. 4 https://bugs.webkit.org/show_bug.cgi?id=195181 5 <rdar://problem/48484164> 6 7 Reviewed by Yusuke Suzuki. 8 9 Previously, we're always masking the shift amount with 0x1f. This is only correct 10 for 32-bit words. For 64-bit words, the mask should be 0x3f. For pointer sized 11 shifts, the mask depends on sizeof(uintptr_t). 12 13 * offlineasm/cloop.rb: 14 1 15 2019-02-28 Justin Fan <justin_fan@apple.com> 2 16 -
trunk/Source/JavaScriptCore/offlineasm/cloop.rb
r239940 r242215 1 # Copyright (C) 2012-201 8Apple Inc. All rights reserved.1 # Copyright (C) 2012-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 427 427 truncationFooter = "" 428 428 end 429 $asm.putc "#{dst.clLValue(type)} = #{truncationHeader}#{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & 0x1f)#{truncationFooter};" 429 # FIXME: rename :int to :intptr to be match their expected names from C++. Ditto for :uint. 430 # https://bugs.webkit.org/show_bug.cgi?id=195183 431 shiftMask = "((sizeof(uintptr_t) == 8) ? 0x3f : 0x1f)" if type == :int || type == :uint 432 shiftMask = "0x3f" if type == :int64 || type == :uint64 433 shiftMask = "0x1f" if type == :int32 || type == :uint32 434 $asm.putc "#{dst.clLValue(type)} = #{truncationHeader}#{operands[1].clValue(type)} #{operator} (#{operands[0].clValue(:int)} & #{shiftMask})#{truncationFooter};" 430 435 end 431 436
Note: See TracChangeset
for help on using the changeset viewer.