8296163: [aarch64] Cleanup Pre/Post addressing mode classes
Reviewed-by: chagedorn, aph
This commit is contained in:
parent
f84b0ad07c
commit
c7b95a895f
@ -303,24 +303,29 @@ public:
|
|||||||
class PrePost {
|
class PrePost {
|
||||||
int _offset;
|
int _offset;
|
||||||
Register _r;
|
Register _r;
|
||||||
public:
|
protected:
|
||||||
PrePost(Register reg, int o) : _offset(o), _r(reg) { }
|
PrePost(Register reg, int o) : _offset(o), _r(reg) { }
|
||||||
int offset() { return _offset; }
|
~PrePost() = default;
|
||||||
Register reg() { return _r; }
|
PrePost(const PrePost&) = default;
|
||||||
|
PrePost& operator=(const PrePost&) = default;
|
||||||
|
public:
|
||||||
|
int offset() const { return _offset; }
|
||||||
|
Register reg() const { return _r; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Pre : public PrePost {
|
class Pre : public PrePost {
|
||||||
public:
|
public:
|
||||||
Pre(Register reg, int o) : PrePost(reg, o) { }
|
Pre(Register reg, int o) : PrePost(reg, o) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Post : public PrePost {
|
class Post : public PrePost {
|
||||||
Register _idx;
|
Register _idx;
|
||||||
bool _is_postreg;
|
bool _is_postreg;
|
||||||
public:
|
public:
|
||||||
Post(Register reg, int o) : PrePost(reg, o) { _idx = noreg; _is_postreg = false; }
|
Post(Register reg, int o) : PrePost(reg, o), _idx(noreg), _is_postreg(false) {}
|
||||||
Post(Register reg, Register idx) : PrePost(reg, 0) { _idx = idx; _is_postreg = true; }
|
Post(Register reg, Register idx) : PrePost(reg, 0), _idx(idx), _is_postreg(true) {}
|
||||||
Register idx_reg() { return _idx; }
|
Register idx_reg() const { return _idx; }
|
||||||
bool is_postreg() {return _is_postreg; }
|
bool is_postreg() const { return _is_postreg; }
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace ext
|
namespace ext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user