applies clang format
This commit is contained in:
parent
f6be8ec006
commit
62768bf81e
|
@ -355,7 +355,7 @@ struct riscv_hart_common {
|
|||
unsigned char other = 0;
|
||||
for(auto i = 0U; i < sym_no; ++i) {
|
||||
symbols.get_symbol(i, name, value, size, bind, type, section, other);
|
||||
if(type==0 && name != "") {
|
||||
if(name != "") {
|
||||
this->symbol_table[name] = value;
|
||||
#ifndef NDEBUG
|
||||
CPPLOG(DEBUG) << "Found Symbol " << name;
|
||||
|
|
|
@ -574,9 +574,8 @@ template <typename BASE, features_e FEAT, typename LOGCAT>
|
|||
std::pair<uint64_t, bool> riscv_hart_m_p<BASE, FEAT, LOGCAT>::load_file(std::string name, int type) {
|
||||
if(read_elf_file(name, sizeof(reg_t) == 4 ? ELFCLASS32 : ELFCLASS64,
|
||||
[this](uint64_t addr, uint64_t size, const uint8_t* const data) -> iss::status {
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM,
|
||||
addr, size, data);
|
||||
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM, addr, size,
|
||||
data);
|
||||
})) {
|
||||
return std::make_pair(entry_address, true);
|
||||
}
|
||||
|
@ -1327,8 +1326,7 @@ uint64_t riscv_hart_m_p<BASE, FEAT, LOGCAT>::enter_trap(uint64_t flags, uint64_t
|
|||
#endif
|
||||
if((flags & 0xffffffff) != 0xffffffff)
|
||||
NSCLOG(INFO, LOGCAT) << (trap_id ? "Interrupt" : "Trap") << " with cause '" << (trap_id ? irq_str[cause] : trap_str[cause]) << "' ("
|
||||
<< cause << ")"
|
||||
<< " at address " << buffer.data() << " occurred";
|
||||
<< cause << ")" << " at address " << buffer.data() << " occurred";
|
||||
return this->reg.NEXT_PC;
|
||||
}
|
||||
|
||||
|
|
|
@ -557,9 +557,8 @@ riscv_hart_msu_vp<BASE>::riscv_hart_msu_vp()
|
|||
template <typename BASE> std::pair<uint64_t, bool> riscv_hart_msu_vp<BASE>::load_file(std::string name, int type) {
|
||||
if(read_elf_file(name, sizeof(reg_t) == 4 ? ELFCLASS32 : ELFCLASS64,
|
||||
[this](uint64_t addr, uint64_t size, const uint8_t* const data) -> iss::status {
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM,
|
||||
addr, size, data);
|
||||
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM, addr, size,
|
||||
data);
|
||||
})) {
|
||||
return std::make_pair(entry_address, true);
|
||||
}
|
||||
|
@ -1338,9 +1337,8 @@ template <typename BASE> uint64_t riscv_hart_msu_vp<BASE>::enter_trap(uint64_t f
|
|||
sprintf(buffer.data(), "0x%016lx", addr);
|
||||
if((flags & 0xffffffff) != 0xffffffff)
|
||||
CLOG(INFO, disass) << (trap_id ? "Interrupt" : "Trap") << " with cause '" << (trap_id ? irq_str[cause] : trap_str[cause]) << "' ("
|
||||
<< cause << ")"
|
||||
<< " at address " << buffer.data() << " occurred, changing privilege level from " << lvl[cur_priv] << " to "
|
||||
<< lvl[new_priv];
|
||||
<< cause << ")" << " at address " << buffer.data() << " occurred, changing privilege level from "
|
||||
<< lvl[cur_priv] << " to " << lvl[new_priv];
|
||||
// reset trap state
|
||||
this->reg.PRIV = new_priv;
|
||||
this->reg.trap_state = 0;
|
||||
|
|
|
@ -651,9 +651,8 @@ template <typename BASE, features_e FEAT, typename LOGCAT>
|
|||
std::pair<uint64_t, bool> riscv_hart_mu_p<BASE, FEAT, LOGCAT>::load_file(std::string name, int type) {
|
||||
if(read_elf_file(name, sizeof(reg_t) == 4 ? ELFCLASS32 : ELFCLASS64,
|
||||
[this](uint64_t addr, uint64_t size, const uint8_t* const data) -> iss::status {
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM,
|
||||
addr, size, data);
|
||||
|
||||
return this->write(iss::address_type::PHYSICAL, iss::access_type::DEBUG_WRITE, traits<BASE>::MEM, addr, size,
|
||||
data);
|
||||
})) {
|
||||
return std::make_pair(entry_address, true);
|
||||
}
|
||||
|
@ -1566,9 +1565,8 @@ uint64_t riscv_hart_mu_p<BASE, FEAT, LOGCAT>::enter_trap(uint64_t flags, uint64_
|
|||
#endif
|
||||
if((flags & 0xffffffff) != 0xffffffff)
|
||||
CLOG(INFO, disass) << (trap_id ? "Interrupt" : "Trap") << " with cause '" << (trap_id ? irq_str[cause] : trap_str[cause]) << "' ("
|
||||
<< cause << ")"
|
||||
<< " at address " << buffer.data() << " occurred, changing privilege level from " << lvl[this->reg.PRIV]
|
||||
<< " to " << lvl[new_priv];
|
||||
<< cause << ")" << " at address " << buffer.data() << " occurred, changing privilege level from "
|
||||
<< lvl[this->reg.PRIV] << " to " << lvl[new_priv];
|
||||
// reset trap state
|
||||
this->reg.PRIV = new_priv;
|
||||
this->reg.trap_state = 0;
|
||||
|
|
Loading…
Reference in New Issue