diff options
author | Martyn Capewell <martyn.capewell@arm.com> | 2020-11-10 14:32:56 +0000 |
---|---|---|
committer | Martyn Capewell <martyn.capewell@arm.com> | 2020-11-10 14:34:18 +0000 |
commit | d42989cf6d64f4d4f14dad7014bec0ca084f1af1 (patch) | |
tree | d9abf2059b95dbac7f1300b0a1ac00b6015ed6c1 | |
parent | c4ef66e95e71f13cb4f1d2983d401fe49bdcc0a7 (diff) | |
download | vixl-d42989cf6d64f4d4f14dad7014bec0ca084f1af1.tar.gz |
Remove use of "dummy"
Replace "dummy" with "placeholder".
Change-Id: I9af7f56c93b49c1a6428414601af1dec475ca3b8
-rw-r--r-- | src/aarch32/location-aarch32.h | 2 | ||||
-rw-r--r-- | src/aarch64/simulator-aarch64.cc | 26 | ||||
-rw-r--r-- | src/aarch64/simulator-aarch64.h | 8 | ||||
-rw-r--r-- | src/code-buffer-vixl.h | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/aarch32/location-aarch32.h b/src/aarch32/location-aarch32.h index 9a57f153..512b9c7c 100644 --- a/src/aarch32/location-aarch32.h +++ b/src/aarch32/location-aarch32.h @@ -58,7 +58,7 @@ class Location : public LocationBase<int32_t> { // with the assembler methods for generating instructions, but will never // be handled by the pool manager. Location() - : LocationBase<int32_t>(kRawLocation, 1 /* dummy size*/), + : LocationBase<int32_t>(kRawLocation, 1 /* placeholder size*/), referenced_(false) {} typedef int32_t Offset; diff --git a/src/aarch64/simulator-aarch64.cc b/src/aarch64/simulator-aarch64.cc index cd5a2d6c..cae59b21 100644 --- a/src/aarch64/simulator-aarch64.cc +++ b/src/aarch64/simulator-aarch64.cc @@ -75,8 +75,8 @@ Simulator::Simulator(Decoder* decoder, FILE* stream, SimStack::Allocated stack) VIXL_ASSERT((static_cast<int32_t>(-1) >> 1) == -1); VIXL_ASSERT((static_cast<uint32_t>(-1) >> 1) == 0x7fffffff); - // Set up a dummy pipe for CanReadMemory. - VIXL_CHECK(pipe(dummy_pipe_fd_) == 0); + // Set up a placeholder pipe for CanReadMemory. + VIXL_CHECK(pipe(placeholder_pipe_fd_) == 0); // Set up the decoder. decoder_ = decoder; @@ -216,8 +216,8 @@ Simulator::~Simulator() { // The decoder may outlive the simulator. decoder_->RemoveVisitor(print_disasm_); delete print_disasm_; - close(dummy_pipe_fd_[0]); - close(dummy_pipe_fd_[1]); + close(placeholder_pipe_fd_[0]); + close(placeholder_pipe_fd_[1]); } @@ -2517,8 +2517,8 @@ void Simulator::CompareAndSwapPairHelper(const Instruction* instr) { bool Simulator::CanReadMemory(uintptr_t address, size_t size) { // To simulate fault-tolerant loads, we need to know what host addresses we // can access without generating a real fault. One way to do that is to - // attempt to `write()` the memory to a dummy pipe[1]. This is more portable - // and less intrusive than using (global) signal handlers. + // attempt to `write()` the memory to a placeholder pipe[1]. This is more + // portable and less intrusive than using (global) signal handlers. // // [1]: https://stackoverflow.com/questions/7134590 @@ -2527,7 +2527,7 @@ bool Simulator::CanReadMemory(uintptr_t address, size_t size) { // `write` will normally return after one invocation, but it is allowed to // handle only part of the operation, so wrap it in a loop. while (can_read && (written < size)) { - ssize_t result = write(dummy_pipe_fd_[1], + ssize_t result = write(placeholder_pipe_fd_[1], reinterpret_cast<void*>(address + written), size - written); if (result > 0) { @@ -2551,13 +2551,13 @@ bool Simulator::CanReadMemory(uintptr_t address, size_t size) { } } // Drain the read side of the pipe. If we don't do this, we'll leak memory as - // the dummy data is buffered. As before, we expect to drain the whole write - // in one invocation, but cannot guarantee that, so we wrap it in a loop. This - // function is primarily intended to implement SVE fault-tolerant loads, so - // the maximum Z register size is a good default buffer size. + // the placeholder data is buffered. As before, we expect to drain the whole + // write in one invocation, but cannot guarantee that, so we wrap it in a + // loop. This function is primarily intended to implement SVE fault-tolerant + // loads, so the maximum Z register size is a good default buffer size. char buffer[kZRegMaxSizeInBytes]; while (written > 0) { - ssize_t result = read(dummy_pipe_fd_[0], + ssize_t result = read(placeholder_pipe_fd_[0], reinterpret_cast<void*>(buffer), sizeof(buffer)); // `read` blocks, and returns 0 only at EOF. We should not hit EOF until @@ -4426,7 +4426,7 @@ void Simulator::SysOp_W(int op, int64_t val) { case CVAP: case CVADP: case CIVAC: { - // Perform a dummy memory access to ensure that we have read access + // Perform a placeholder memory access to ensure that we have read access // to the specified address. volatile uint8_t y = MemRead<uint8_t>(val); USE(y); diff --git a/src/aarch64/simulator-aarch64.h b/src/aarch64/simulator-aarch64.h index f8bc2754..44fb0cdb 100644 --- a/src/aarch64/simulator-aarch64.h +++ b/src/aarch64/simulator-aarch64.h @@ -4621,10 +4621,10 @@ class Simulator : public DecoderVisitor { bool CanReadMemory(uintptr_t address, size_t size); - // CanReadMemory needs dummy file descriptors, so we use a pipe. We can save - // some system call overhead by opening them on construction, rather than on - // every call to CanReadMemory. - int dummy_pipe_fd_[2]; + // CanReadMemory needs placeholder file descriptors, so we use a pipe. We can + // save some system call overhead by opening them on construction, rather than + // on every call to CanReadMemory. + int placeholder_pipe_fd_[2]; template <typename T> static T FPDefaultNaN(); diff --git a/src/code-buffer-vixl.h b/src/code-buffer-vixl.h index a43c5843..9a1efd44 100644 --- a/src/code-buffer-vixl.h +++ b/src/code-buffer-vixl.h @@ -164,8 +164,8 @@ class CodeBuffer { *has_grown = is_full; } void EnsureSpaceFor(size_t amount) { - bool dummy; - EnsureSpaceFor(amount, &dummy); + bool placeholder; + EnsureSpaceFor(amount, &placeholder); } private: |