OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |