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

Unified Diff: runtime/vm/assembler_ia32.h

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 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 | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.h
diff --git a/runtime/vm/assembler_ia32.h b/runtime/vm/assembler_ia32.h
index d49e84451f5ee77a7cbc5c687c30d9f27ec4ade5..90214f5ce238611ea8cc664801b74da7231ba641 100644
--- a/runtime/vm/assembler_ia32.h
+++ b/runtime/vm/assembler_ia32.h
@@ -21,9 +21,9 @@ class StubEntry;
class Immediate : public ValueObject {
public:
- explicit Immediate(int32_t value) : value_(value) { }
+ explicit Immediate(int32_t value) : value_(value) {}
- Immediate(const Immediate& other) : ValueObject(), value_(other.value_) { }
+ Immediate(const Immediate& other) : ValueObject(), value_(other.value_) {}
int32_t value() const { return value_; }
@@ -42,13 +42,9 @@ class Immediate : public ValueObject {
class Operand : public ValueObject {
public:
- uint8_t mod() const {
- return (encoding_at(0) >> 6) & 3;
- }
+ uint8_t mod() const { return (encoding_at(0) >> 6) & 3; }
- Register rm() const {
- return static_cast<Register>(encoding_at(0) & 7);
- }
+ Register rm() const { return static_cast<Register>(encoding_at(0) & 7); }
ScaleFactor scale() const {
return static_cast<ScaleFactor>((encoding_at(1) >> 6) & 3);
@@ -58,9 +54,7 @@ class Operand : public ValueObject {
return static_cast<Register>((encoding_at(1) >> 3) & 7);
}
- Register base() const {
- return static_cast<Register>(encoding_at(1) & 7);
- }
+ Register base() const { return static_cast<Register>(encoding_at(1) & 7); }
int8_t disp8() const {
ASSERT(length_ >= 2);
@@ -91,7 +85,7 @@ class Operand : public ValueObject {
}
protected:
- Operand() : length_(0) { } // Needed by subclass Address.
+ Operand() : length_(0) {} // Needed by subclass Address.
void SetModRM(int mod, Register rm) {
ASSERT((mod & ~3) == 0);
@@ -135,7 +129,7 @@ class Operand : public ValueObject {
// disguise. Used from the assembler to generate better encodings.
bool IsRegister(Register reg) const {
return ((encoding_[0] & 0xF8) == 0xC0) // Addressing mode is register only.
- && ((encoding_[0] & 0x07) == reg); // Register codes match.
+ && ((encoding_[0] & 0x07) == reg); // Register codes match.
}
friend class Assembler;
@@ -188,7 +182,7 @@ class Address : public Operand {
// This addressing mode does not exist.
Address(Register base, Register index, ScaleFactor scale, Register r);
- Address(const Address& other) : Operand(other) { }
+ Address(const Address& other) : Operand(other) {}
Address& operator=(const Address& other) {
Operand::operator=(other);
@@ -203,25 +197,25 @@ class Address : public Operand {
}
private:
- Address() { } // Needed by Address::Absolute.
+ Address() {} // Needed by Address::Absolute.
};
class FieldAddress : public Address {
public:
FieldAddress(Register base, int32_t disp)
- : Address(base, disp - kHeapObjectTag) { }
+ : Address(base, disp - kHeapObjectTag) {}
// This addressing mode does not exist.
FieldAddress(Register base, Register r);
FieldAddress(Register base, Register index, ScaleFactor scale, int32_t disp)
- : Address(base, index, scale, disp - kHeapObjectTag) { }
+ : Address(base, index, scale, disp - kHeapObjectTag) {}
// This addressing mode does not exist.
FieldAddress(Register base, Register index, ScaleFactor scale, Register r);
- FieldAddress(const FieldAddress& other) : Address(other) { }
+ FieldAddress(const FieldAddress& other) : Address(other) {}
FieldAddress& operator=(const FieldAddress& other) {
Address::operator=(other);
@@ -310,7 +304,7 @@ class Assembler : public ValueObject {
// This mode is only needed and implemented for MIPS and ARM.
ASSERT(!use_far_branches);
}
- ~Assembler() { }
+ ~Assembler() {}
static const bool kNearJump = true;
static const bool kFarJump = false;
@@ -498,9 +492,9 @@ class Assembler : public ValueObject {
enum RoundingMode {
kRoundToNearest = 0x0,
- kRoundDown = 0x1,
- kRoundUp = 0x2,
- kRoundToZero = 0x3
+ kRoundDown = 0x1,
+ kRoundUp = 0x2,
+ kRoundToZero = 0x3
};
void roundsd(XmmRegister dst, XmmRegister src, RoundingMode mode);
@@ -632,9 +626,7 @@ class Assembler : public ValueObject {
void int3();
void hlt();
- static uword GetBreakInstructionFiller() {
- return 0xCCCCCCCC;
- }
+ static uword GetBreakInstructionFiller() { return 0xCCCCCCCC; }
void j(Condition condition, Label* label, bool near = kFarJump);
void j(Condition condition, const ExternalLabel* label);
@@ -675,9 +667,9 @@ class Assembler : public ValueObject {
void CompareObject(Register reg, const Object& object);
void LoadDoubleConstant(XmmRegister dst, double value);
- void StoreIntoObject(Register object, // Object we are storing into.
+ void StoreIntoObject(Register object, // Object we are storing into.
const Address& dest, // Where we are storing into.
- Register value, // Value we are storing.
+ Register value, // Value we are storing.
bool can_value_be_smi = true);
void StoreIntoObjectNoBarrier(Register object,
@@ -759,13 +751,9 @@ class Assembler : public ValueObject {
/*
* Misc. functionality
*/
- void SmiTag(Register reg) {
- addl(reg, reg);
- }
+ void SmiTag(Register reg) { addl(reg, reg); }
- void SmiUntag(Register reg) {
- sarl(reg, Immediate(kSmiTagSize));
- }
+ void SmiUntag(Register reg) { sarl(reg, Immediate(kSmiTagSize)); }
void BranchIfNotSmi(Register reg, Label* label) {
testl(reg, Immediate(kSmiTagMask));
@@ -777,9 +765,7 @@ class Assembler : public ValueObject {
void Jump(Label* label) { jmp(label); }
// Address of code at offset.
- uword CodeAddress(intptr_t offset) {
- return buffer_.Address(offset);
- }
+ uword CodeAddress(intptr_t offset) { return buffer_.Address(offset); }
intptr_t CodeSize() const { return buffer_.Size(); }
intptr_t prologue_offset() const { return prologue_offset_; }
@@ -787,9 +773,7 @@ class Assembler : public ValueObject {
// Count the fixups that produce a pointer offset, without processing
// the fixups.
- intptr_t CountPointerOffsets() const {
- return buffer_.CountPointerOffsets();
- }
+ intptr_t CountPointerOffsets() const { return buffer_.CountPointerOffsets(); }
const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
return buffer_.pointer_offsets();
}
@@ -932,9 +916,7 @@ class Assembler : public ValueObject {
return !object.IsSmi() || IsSafeSmi(object);
}
- void set_code_object(const Code& code) {
- code_ ^= code.raw();
- }
+ void set_code_object(const Code& code) { code_ ^= code.raw(); }
void PushCodeObject();
@@ -942,7 +924,7 @@ class Assembler : public ValueObject {
class CodeComment : public ZoneAllocated {
public:
CodeComment(intptr_t pc_offset, const String& comment)
- : pc_offset_(pc_offset), comment_(comment) { }
+ : pc_offset_(pc_offset), comment_(comment) {}
intptr_t pc_offset() const { return pc_offset_; }
const String& comment() const { return comment_; }
« no previous file with comments | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698