Commit 8d9615ed authored by Hao Xu's avatar Hao Xu Committed by V8 LUCI CQ

[CSA] Avoid sign-extending LoadIC's Smi handler when possible

Smi handler in LoadIC is decoded to IntPtrT and result in
sign-extending Smi's value when pointer compression is enabled. This
CL avoid this sign-extension by decoding the Smi to Int32T.

Change-Id: I3ddd6dcec8654d6c13d472a077a55698359d126a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740481
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81525}
parent 5febb062
This diff is collapsed.
...@@ -379,15 +379,16 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler { ...@@ -379,15 +379,16 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler {
void HandleLoadCallbackProperty(const LazyLoadICParameters* p, void HandleLoadCallbackProperty(const LazyLoadICParameters* p,
TNode<JSObject> holder, TNode<JSObject> holder,
TNode<WordT> handler_word, TNode<Word32T> handler_word,
ExitPoint* exit_point); ExitPoint* exit_point);
void HandleLoadAccessor(const LazyLoadICParameters* p, void HandleLoadAccessor(const LazyLoadICParameters* p,
TNode<CallHandlerInfo> call_handler_info, TNode<CallHandlerInfo> call_handler_info,
TNode<WordT> handler_word, TNode<DataHandler> handler, TNode<Word32T> handler_word,
TNode<IntPtrT> handler_kind, ExitPoint* exit_point); TNode<DataHandler> handler,
TNode<Uint32T> handler_kind, ExitPoint* exit_point);
void HandleLoadField(TNode<JSObject> holder, TNode<WordT> handler_word, void HandleLoadField(TNode<JSObject> holder, TNode<Word32T> handler_word,
TVariable<Float64T>* var_double_value, TVariable<Float64T>* var_double_value,
Label* rebox_double, Label* miss, ExitPoint* exit_point); Label* rebox_double, Label* miss, ExitPoint* exit_point);
...@@ -398,7 +399,8 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler { ...@@ -398,7 +399,8 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler {
TVariable<Float64T>* var_double_value, TVariable<Float64T>* var_double_value,
Label* rebox_double, ExitPoint* exit_point); Label* rebox_double, ExitPoint* exit_point);
void HandleLoadWasmField(TNode<WasmObject> holder, TNode<WordT> handler_word, void HandleLoadWasmField(TNode<WasmObject> holder,
TNode<Word32T> handler_word,
TVariable<Float64T>* var_double_value, TVariable<Float64T>* var_double_value,
Label* rebox_double, ExitPoint* exit_point); Label* rebox_double, ExitPoint* exit_point);
#endif // V8_ENABLE_WEBASSEMBLY #endif // V8_ENABLE_WEBASSEMBLY
...@@ -409,14 +411,14 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler { ...@@ -409,14 +411,14 @@ class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler {
void HandleLoadICSmiHandlerLoadNamedCase( void HandleLoadICSmiHandlerLoadNamedCase(
const LazyLoadICParameters* p, TNode<Object> holder, const LazyLoadICParameters* p, TNode<Object> holder,
TNode<IntPtrT> handler_kind, TNode<WordT> handler_word, TNode<Uint32T> handler_kind, TNode<Word32T> handler_word,
Label* rebox_double, TVariable<Float64T>* var_double_value, Label* rebox_double, TVariable<Float64T>* var_double_value,
TNode<Object> handler, Label* miss, ExitPoint* exit_point, ICMode ic_mode, TNode<Object> handler, Label* miss, ExitPoint* exit_point, ICMode ic_mode,
OnNonExistent on_nonexistent, ElementSupport support_elements); OnNonExistent on_nonexistent, ElementSupport support_elements);
void HandleLoadICSmiHandlerHasNamedCase(const LazyLoadICParameters* p, void HandleLoadICSmiHandlerHasNamedCase(const LazyLoadICParameters* p,
TNode<Object> holder, TNode<Object> holder,
TNode<IntPtrT> handler_kind, TNode<Uint32T> handler_kind,
Label* miss, ExitPoint* exit_point, Label* miss, ExitPoint* exit_point,
ICMode ic_mode); ICMode ic_mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment