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

Unified Diff: src/assembler_ia32.h

Issue 699923002: More consistently use auto for emit*, nullptr in asm code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler_ia32.h
diff --git a/src/assembler_ia32.h b/src/assembler_ia32.h
index f393f715df4f264c7998230f875040dee24dd02b..77159c49303e943f2fa65008f0ed1698dcca16ff 100644
--- a/src/assembler_ia32.h
+++ b/src/assembler_ia32.h
@@ -72,7 +72,7 @@ class Immediate {
Immediate &operator=(const Immediate &) = delete;
public:
- explicit Immediate(int32_t value) : value_(value), fixup_(NULL) {}
+ explicit Immediate(int32_t value) : value_(value), fixup_(nullptr) {}
explicit Immediate(AssemblerFixup *fixup)
: value_(fixup->value()->getOffset()), fixup_(fixup) {
@@ -87,11 +87,15 @@ public:
bool is_int8() const {
// We currently only allow 32-bit fixups, and they usually have value = 0,
- // so if fixup_ != NULL, it shouldn't be classified as int8/16.
- return fixup_ == NULL && Utils::IsInt(8, value_);
+ // so if fixup_ != nullptr, it shouldn't be classified as int8/16.
+ return fixup_ == nullptr && Utils::IsInt(8, value_);
+ }
+ bool is_uint8() const {
+ return fixup_ == nullptr && Utils::IsUint(8, value_);
+ }
+ bool is_uint16() const {
+ return fixup_ == nullptr && Utils::IsUint(16, value_);
}
- bool is_uint8() const { return fixup_ == NULL && Utils::IsUint(8, value_); }
- bool is_uint16() const { return fixup_ == NULL && Utils::IsUint(16, value_); }
private:
const int32_t value_;
@@ -142,7 +146,7 @@ public:
AssemblerFixup *fixup() const { return fixup_; }
protected:
- Operand() : length_(0), fixup_(NULL) {} // Needed by subclass Address.
+ Operand() : length_(0), fixup_(nullptr) {} // Needed by subclass Address.
void SetModRM(int mod, GPRRegister rm) {
assert((mod & ~3) == 0);
@@ -176,7 +180,7 @@ private:
uint8_t encoding_[6];
AssemblerFixup *fixup_;
- explicit Operand(GPRRegister reg) : fixup_(NULL) { SetModRM(3, reg); }
+ explicit Operand(GPRRegister reg) : fixup_(nullptr) { SetModRM(3, reg); }
// Get the operand encoding byte at the given index.
uint8_t encoding_at(intptr_t index) const {
« no previous file with comments | « src/assembler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698