Compare commits
	
		
			1 Commits
		
	
	
		
			cfc980a069
			...
			e238369e18
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e238369e18 | 
@@ -40,14 +40,8 @@ private:
 | 
				
			|||||||
        std::copy(data, data + length, p.data() + (addr & mem.page_addr_mask));
 | 
					        std::copy(data, data + length, p.data() + (addr & mem.page_addr_mask));
 | 
				
			||||||
        // this->tohost handling in case of riscv-test
 | 
					        // this->tohost handling in case of riscv-test
 | 
				
			||||||
        // according to https://github.com/riscv-software-src/riscv-isa-sim/issues/364#issuecomment-607657754:
 | 
					        // according to https://github.com/riscv-software-src/riscv-isa-sim/issues/364#issuecomment-607657754:
 | 
				
			||||||
        if(access && iss::access_type::FUNC) {
 | 
					        if(access && iss::access_type::FUNC && addr == hart_if.tohost) {
 | 
				
			||||||
            if(addr == hart_if.tohost) {
 | 
					            return hart_if.exec_htif(data);
 | 
				
			||||||
                return hart_if.exec_htif(data);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if((WORD_LEN == 32 && addr == hart_if.fromhost + 4) || (WORD_LEN == 64 && addr == hart_if.fromhost)) {
 | 
					 | 
				
			||||||
                uint64_t fhostvar = *reinterpret_cast<uint64_t*>(p.data() + (hart_if.fromhost & mem.page_addr_mask));
 | 
					 | 
				
			||||||
                *reinterpret_cast<uint64_t*>(p.data() + (hart_if.tohost & mem.page_addr_mask)) = fhostvar;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return iss::Ok;
 | 
					        return iss::Ok;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user