摘要:
#include <vector> #include <utility> // 对于 std::move #include <type_traits> #include <iostream> using namespace std; template<typename T> struct A { A 阅读全文
摘要:
problem1 How many bytes is the program? For the above x86 assembly code, how many bytes of instructions need to be fetched if x = 0x01020304 and n = 5 阅读全文
摘要:
3.4 Note how the mix of different types of instructions vary between benchmarks. Record the mix for each benchmark. (Remember: Do not provide raw dump 阅读全文
摘要:
![image](https://img2023.cnblogs.com/blog/1481923/202311/1481923-20231129110844813-948831792.png) 阅读全文
摘要:
参考: code: https://github.com/mit-pdos/xv6-riscv book: https://pdos.csail.mit.edu/6.828/2021/xv6/book-riscv-rev2.pdf note: https://mit-public-courses-c 阅读全文
摘要:
Traps and System calls 什么是trap 在xv6操作系统中,"trap"是指cpu暂时跳出正常执行流程,从用户态切换到内核态的一种机制。这种切换,在xv6系统中,在这3个情况下发生:系统调用、异常、外部设备触发了中断。 系统调用就是使用了ecall指令,之前lab中增加过tra 阅读全文
摘要:
```cpp #include #include #include #include using namespace std; struct B { int v = 100; ~B() { v = 0; } }; struct A { A(B* p) { aa = p; } B* aa = null 阅读全文
摘要:
EXAMPLE ONE template <typename T, T b, uint32_t e> struct pow : std::integral_constant<decltype(b * 1), b * pow<T, b, e - 1>::value> {}; template <typ 阅读全文
摘要:
目录proj3objectstipsPart ATask1 ALUtipsinfo:testinginspecting testsTask2 register filetipstestingtask3 the addi instructioninfo:memoryinfo: branch compa 阅读全文