diff options
author | Ruiling Song <ruiling.song@intel.com> | 2014-07-30 13:59:30 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-07-30 15:24:03 +0800 |
commit | 4c713434c54a9edafbf5c5e9a830fd00cbf7db0d (patch) | |
tree | 4690e52273daee56cf146450d50833e03a317016 /backend/src/ir/printf.hpp | |
parent | e16f34c027b3e7a19355c91d728632d82995b2b0 (diff) |
GBE: Handle bti allocation for internal buffer used by printf.
1. Move the bti/Register map from gbe::Context to ir::Function.
2. use GlobalVariable instead of 'call' to get internal buffer (used for printf) base address.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'backend/src/ir/printf.hpp')
-rw-r--r-- | backend/src/ir/printf.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/src/ir/printf.hpp b/backend/src/ir/printf.hpp index 1aef767f..4db72455 100644 --- a/backend/src/ir/printf.hpp +++ b/backend/src/ir/printf.hpp @@ -155,6 +155,8 @@ namespace gbe } sizeOfSize = other.sizeOfSize; + btiBuf = other.btiBuf; + btiIndexBuf = other.btiIndexBuf; } PrintfSet(void) = default; @@ -180,6 +182,11 @@ namespace gbe return sizeOfSize; } + void setBufBTI(uint8_t b) { btiBuf = b; } + void setIndexBufBTI(uint8_t b) { btiIndexBuf = b; } + uint8_t getBufBTI() const { return btiBuf; } + uint8_t getIndexBufBTI() const { return btiIndexBuf; } + uint32_t getPrintfBufferElementSize(uint32_t i) { PrintfSlot* slot = slots[i]; int vec_num = 1; @@ -226,6 +233,8 @@ namespace gbe vector<PrintfSlot*> slots; uint32_t sizeOfSize; // Total sizeof size. friend struct LockOutput; + uint8_t btiBuf; + uint8_t btiIndexBuf; static pthread_mutex_t lock; GBE_CLASS(PrintfSet); }; |