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

Side by Side Diff: src/assembler_ia32.h

Issue 1136793002: Handle ARM "ret void" and function alignment with proper padding. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: note moved to cpp Created 5 years, 7 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
« no previous file with comments | « src/assembler_arm32.h ('k') | tests_lit/llvm2ice_tests/function_aligned.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===//
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 ~AssemblerX8632() override; 346 ~AssemblerX8632() override;
347 347
348 static const bool kNearJump = true; 348 static const bool kNearJump = true;
349 static const bool kFarJump = false; 349 static const bool kFarJump = false;
350 350
351 void alignFunction() override; 351 void alignFunction() override;
352 352
353 SizeT getBundleAlignLog2Bytes() const override { return 5; } 353 SizeT getBundleAlignLog2Bytes() const override { return 5; }
354 354
355 const char *getNonExecPadDirective() const override { return ".p2align"; }
356
355 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override { 357 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override {
356 static const uint8_t Padding[] = {0xF4}; 358 static const uint8_t Padding[] = {0xF4};
357 return llvm::ArrayRef<uint8_t>(Padding, 1); 359 return llvm::ArrayRef<uint8_t>(Padding, 1);
358 } 360 }
359 361
360 void padWithNop(intptr_t Padding) override { 362 void padWithNop(intptr_t Padding) override {
361 while (Padding > MAX_NOP_SIZE) { 363 while (Padding > MAX_NOP_SIZE) {
362 nop(MAX_NOP_SIZE); 364 nop(MAX_NOP_SIZE);
363 Padding -= MAX_NOP_SIZE; 365 Padding -= MAX_NOP_SIZE;
364 } 366 }
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 inline void AssemblerX8632::EmitFixup(AssemblerFixup *fixup) { 883 inline void AssemblerX8632::EmitFixup(AssemblerFixup *fixup) {
882 buffer_.EmitFixup(fixup); 884 buffer_.EmitFixup(fixup);
883 } 885 }
884 886
885 inline void AssemblerX8632::EmitOperandSizeOverride() { EmitUint8(0x66); } 887 inline void AssemblerX8632::EmitOperandSizeOverride() { EmitUint8(0x66); }
886 888
887 } // end of namespace X8632 889 } // end of namespace X8632
888 } // end of namespace Ice 890 } // end of namespace Ice
889 891
890 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H 892 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H
OLDNEW
« no previous file with comments | « src/assembler_arm32.h ('k') | tests_lit/llvm2ice_tests/function_aligned.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698