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

Side by Side Diff: src/IceInstARM32.h

Issue 1676123002: Subzero: Use a proper RegNumT type instead of int32_t/SizeT. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make it possible to do "auto NewReg = RegNumT::NoRegister;" Created 4 years, 10 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/IceCfgNode.cpp ('k') | src/IceInstARM32.cpp » ('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/IceInstARM32.h - ARM32 machine instructions --*- C++ -*-===// 1 //===- subzero/src/IceInstARM32.h - ARM32 machine instructions --*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 public: 348 public:
349 static StackVariable *create(Cfg *Func, Type Ty, SizeT Index) { 349 static StackVariable *create(Cfg *Func, Type Ty, SizeT Index) {
350 return new (Func->allocate<StackVariable>()) StackVariable(Ty, Index); 350 return new (Func->allocate<StackVariable>()) StackVariable(Ty, Index);
351 } 351 }
352 constexpr static auto StackVariableKind = 352 constexpr static auto StackVariableKind =
353 static_cast<OperandKind>(kVariable_Target); 353 static_cast<OperandKind>(kVariable_Target);
354 static bool classof(const Operand *Operand) { 354 static bool classof(const Operand *Operand) {
355 return Operand->getKind() == StackVariableKind; 355 return Operand->getKind() == StackVariableKind;
356 } 356 }
357 void setBaseRegNum(int32_t RegNum) { BaseRegNum = RegNum; } 357 void setBaseRegNum(RegNumT RegNum) { BaseRegNum = RegNum; }
358 int32_t getBaseRegNum() const override { return BaseRegNum; } 358 RegNumT getBaseRegNum() const override { return BaseRegNum; }
359 // Inherit dump() and emit() from Variable. 359 // Inherit dump() and emit() from Variable.
360 360
361 private: 361 private:
362 StackVariable(Type Ty, SizeT Index) 362 StackVariable(Type Ty, SizeT Index)
363 : Variable(StackVariableKind, Ty, Index) {} 363 : Variable(StackVariableKind, Ty, Index) {}
364 int32_t BaseRegNum = Variable::NoRegister; 364 RegNumT BaseRegNum = RegNumT::NoRegister;
365 }; 365 };
366 366
367 /// Base class for ARM instructions. While most ARM instructions can be 367 /// Base class for ARM instructions. While most ARM instructions can be
368 /// conditionally executed, a few of them are not predicable (halt, memory 368 /// conditionally executed, a few of them are not predicable (halt, memory
369 /// barriers, etc.). 369 /// barriers, etc.).
370 class InstARM32 : public InstTarget { 370 class InstARM32 : public InstTarget {
371 InstARM32() = delete; 371 InstARM32() = delete;
372 InstARM32(const InstARM32 &) = delete; 372 InstARM32(const InstARM32 &) = delete;
373 InstARM32 &operator=(const InstARM32 &) = delete; 373 InstARM32 &operator=(const InstARM32 &) = delete;
374 374
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 // violations and link errors. 1518 // violations and link errors.
1519 1519
1520 template <> void InstARM32Ldr::emit(const Cfg *Func) const; 1520 template <> void InstARM32Ldr::emit(const Cfg *Func) const;
1521 template <> void InstARM32Movw::emit(const Cfg *Func) const; 1521 template <> void InstARM32Movw::emit(const Cfg *Func) const;
1522 template <> void InstARM32Movt::emit(const Cfg *Func) const; 1522 template <> void InstARM32Movt::emit(const Cfg *Func) const;
1523 1523
1524 } // end of namespace ARM32 1524 } // end of namespace ARM32
1525 } // end of namespace Ice 1525 } // end of namespace Ice
1526 1526
1527 #endif // SUBZERO_SRC_ICEINSTARM32_H 1527 #endif // SUBZERO_SRC_ICEINSTARM32_H
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698