|
|
|
@ -617,6 +617,12 @@ struct RegRip { |
|
|
|
|
const Label* label_; |
|
|
|
|
bool isAddr_; |
|
|
|
|
explicit RegRip(sint64 disp = 0, const Label* label = 0, bool isAddr = false) : disp_(disp), label_(label), isAddr_(isAddr) {} |
|
|
|
|
friend const RegRip operator+(const RegRip& r, int disp) { |
|
|
|
|
return RegRip(r.disp_ + disp, r.label_, r.isAddr_); |
|
|
|
|
} |
|
|
|
|
friend const RegRip operator-(const RegRip& r, int disp) { |
|
|
|
|
return RegRip(r.disp_ - disp, r.label_, r.isAddr_); |
|
|
|
|
} |
|
|
|
|
friend const RegRip operator+(const RegRip& r, sint64 disp) { |
|
|
|
|
return RegRip(r.disp_ + disp, r.label_, r.isAddr_); |
|
|
|
|
} |
|
|
|
|