docker 模拟 qemu ,目前看起来工作的挺顺利的
https://docs.gitlab.com/omnibus/development/s390x.html我跑了一段 chatgpt 生成的代码
```
root@c12d4066a1ef:~# g++
check_endian.cc -O2 -o is_big_endian\?
root@c12d4066a1ef:~# ./is_big_endian\?
Original Number: 258
Bytes: 1 2
System is Big Endian
root@c12d4066a1ef:~# cat
check_endian.cc#include <iostream>
#include <cstring>
int main() {
short int num = 0x0102;
char *num_ptr = (char*)#
std::cout << "Original Number: " << num << std::endl;
std::cout << "Bytes: ";
for (int i = 0; i < sizeof(num); i++) {
std::cout << (int)*(num_ptr + i) << " ";
}
std::cout << std::endl;
if (*num_ptr == 0x01) {
std::cout << "System is Big Endian" << std::endl;
} else {
std::cout << "System is Little Endian" << std::endl;
}
return 0;
}
root@c12d4066a1ef:~# lscpu | grep Endian
Byte Order: Big Endian
root@c12d4066a1ef:~#
```