Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: src/arm64/full-codegen-arm64.cc

Issue 230553004: ARM64: Access has_pending_message_ correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4802 matching lines...) Expand 10 before | Expand all | Expand 10 after
4813 __ Push(result_register(), x10); 4813 __ Push(result_register(), x10);
4814 4814
4815 // Store pending message while executing finally block. 4815 // Store pending message while executing finally block.
4816 ExternalReference pending_message_obj = 4816 ExternalReference pending_message_obj =
4817 ExternalReference::address_of_pending_message_obj(isolate()); 4817 ExternalReference::address_of_pending_message_obj(isolate());
4818 __ Mov(x10, pending_message_obj); 4818 __ Mov(x10, pending_message_obj);
4819 __ Ldr(x10, MemOperand(x10)); 4819 __ Ldr(x10, MemOperand(x10));
4820 4820
4821 ExternalReference has_pending_message = 4821 ExternalReference has_pending_message =
4822 ExternalReference::address_of_has_pending_message(isolate()); 4822 ExternalReference::address_of_has_pending_message(isolate());
4823 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof)
4823 __ Mov(x11, has_pending_message); 4824 __ Mov(x11, has_pending_message);
4824 __ Ldr(x11, MemOperand(x11)); 4825 __ Ldrb(x11, MemOperand(x11));
4825 __ SmiTag(x11); 4826 __ SmiTag(x11);
4826 4827
4827 __ Push(x10, x11); 4828 __ Push(x10, x11);
4828 4829
4829 ExternalReference pending_message_script = 4830 ExternalReference pending_message_script =
4830 ExternalReference::address_of_pending_message_script(isolate()); 4831 ExternalReference::address_of_pending_message_script(isolate());
4831 __ Mov(x10, pending_message_script); 4832 __ Mov(x10, pending_message_script);
4832 __ Ldr(x10, MemOperand(x10)); 4833 __ Ldr(x10, MemOperand(x10));
4833 __ Push(x10); 4834 __ Push(x10);
4834 } 4835 }
4835 4836
4836 4837
4837 void FullCodeGenerator::ExitFinallyBlock() { 4838 void FullCodeGenerator::ExitFinallyBlock() {
4838 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock"); 4839 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock");
4839 ASSERT(!result_register().is(x10)); 4840 ASSERT(!result_register().is(x10));
4840 4841
4841 // Restore pending message from stack. 4842 // Restore pending message from stack.
4842 __ Pop(x10, x11, x12); 4843 __ Pop(x10, x11, x12);
4843 ExternalReference pending_message_script = 4844 ExternalReference pending_message_script =
4844 ExternalReference::address_of_pending_message_script(isolate()); 4845 ExternalReference::address_of_pending_message_script(isolate());
4845 __ Mov(x13, pending_message_script); 4846 __ Mov(x13, pending_message_script);
4846 __ Str(x10, MemOperand(x13)); 4847 __ Str(x10, MemOperand(x13));
4847 4848
4848 __ SmiUntag(x11); 4849 __ SmiUntag(x11);
4849 ExternalReference has_pending_message = 4850 ExternalReference has_pending_message =
4850 ExternalReference::address_of_has_pending_message(isolate()); 4851 ExternalReference::address_of_has_pending_message(isolate());
4851 __ Mov(x13, has_pending_message); 4852 __ Mov(x13, has_pending_message);
4852 __ Str(x11, MemOperand(x13)); 4853 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof)
jbramley 2014/04/09 13:41:12 This is defined in the ABI for both ARM and AArch6
ulan 2014/04/09 13:51:47 Another solution would be to change the type of "h
4854 __ Strb(x11, MemOperand(x13));
4853 4855
4854 ExternalReference pending_message_obj = 4856 ExternalReference pending_message_obj =
4855 ExternalReference::address_of_pending_message_obj(isolate()); 4857 ExternalReference::address_of_pending_message_obj(isolate());
4856 __ Mov(x13, pending_message_obj); 4858 __ Mov(x13, pending_message_obj);
4857 __ Str(x12, MemOperand(x13)); 4859 __ Str(x12, MemOperand(x13));
4858 4860
4859 // Restore result register and cooked return address from the stack. 4861 // Restore result register and cooked return address from the stack.
4860 __ Pop(x10, result_register()); 4862 __ Pop(x10, result_register());
4861 4863
4862 // Uncook the return address (see EnterFinallyBlock). 4864 // Uncook the return address (see EnterFinallyBlock).
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
4991 return previous_; 4993 return previous_;
4992 } 4994 }
4993 4995
4994 4996
4995 #undef __ 4997 #undef __
4996 4998
4997 4999
4998 } } // namespace v8::internal 5000 } } // namespace v8::internal
4999 5001
5000 #endif // V8_TARGET_ARCH_ARM64 5002 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698