How to run SPEC CPU2017 and disable checksum

1. Environment Preparation ​Install Dependencies: For Ubuntu/Debian (ARM cross-compilation example): sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gfortran-aarch64-linux-gnu Ensure ulimit is set to unlimited: ulimit -s unlimited 2. Install SPEC CPU2017 ​Mount the ISO File: mount -o loop cpu2017-1.1.5.iso /mnt # Mount ISO to /mnt mkdir /home/speccpu cp /mnt/* -r /home/speccpu # Copy files to installation directory chmod -R 755 /home/speccpu # Set permissions Run Installation Script: cd /home/speccpu ./install.sh # Follow prompts and confirm with "yes" 3. Configure the Test Environment ​Modify the Configuration File: Copy the default config (e.g., Example-gcc-linux-aarch64.cfg) and…

Enabling PAC and BTI on AArch64 for Linux

Source code for the examples can be found at https://gitlab.arm.com/pac-and-bti-blog/blog-example and the tag will be referenced with the "Tag" keyword before source examples. Certain versions of Arm 64-bit processors have features that can help provide control flow integrity and reduce gadget space, making software more robust in the face of attack. Pointer Authentication Codes (PAC) work by signing and verifying indirect branch targets and branch target instructions (BTI) function by marking all valid branch locations. These technologies harden the control flow by ensuring that modification of control flow…

Running arm64 docker container on x86

Make sure to install the packages mentioned in , which then will allows docker to leverage qemu, which then emulates the target cpu architecture. binfmt Use the  image to install QEMU and register the executable types on the host with a single command: $ docker run --privileged --rm tonistiigi/binfmt --install all This installs the QEMU binaries and registers them with , enabling QEMU to execute non-native file formats for emulation. Once QEMU is installed and the executable types are registered on the host OS, they work transparently inside containers. You can…

A Quick and Easy Guide to tmux

I love working with the command line. I think there’s hardly any more productive and versatile tool for a software developer than the terminal. The additional hacker/wizard/neckbeard kind of feeling you get when using a terminal comes for free, what’s not to love? Over the years I’ve tried to streamline and customize my command line experience to be more convenient, more fun to use or just to look rad. One of the most important tools to drive my daily command line experience is tmux. Check this out: This screenshot…

Everything I know about GNU toolchain

As mainly an LLVM person, I occasionally contribute to GNU toolchain projects. This is sometimes for fun, sometimes for investigating why an (usually ancient) feature works in a particular way, sometimes for pushing forward a toolchain feature with the mind of both communities, or sometimes just for getting sense of how things work with mailing list+GNU make. For a debug build, I normally place my build directory out/debug directly under the project root. Dependency chain of a port: GCC needs binutils. Linux kernel needs GCC. glibc needs Linux kernel. binutils…

How to compile coreutils / binutils for aarch64 in x64

Dockcross git clone https://github.com/dockcross/dockcross.git cd dockcross docker run --rm dockcross/linux-arm64> ./dockcross-linux-arm64 chmod +x ./dockcross-linux-arm64 mv ./dockcross-linux-arm64 ~/bin/ Coreutils / Binutils //Go to the repository diretory dockcross-linux-arm64 bash //In the docker work diretory ./bootstrap(only for coreutils) mkdir aarch64 cd aarch64 ../configure make make check(run official test) Building GDB Natively Ever since the GDB and the binutils repositories were integrated (due to the git migration), it has become a bit more complex to build GDB. Of course, you can still do a simple ./configure && make, but you might actually want to disable…

How to launch ARM aarch64 VM with QEMU from scratch

The below instructions will allow for bringing up an ARM VM from scratch. To launch an aarch64 VM we first need to install a few dependencies, including QEMU and the qemu-efi-aarch64 package, which includes the efi firmware. apt-get install qemu-system-arm apt-get install qemu-efi-aarch64 apt-get install qemu-utils Create the flash images with the correct sizes. dd if=/dev/zero of=flash1.img bs=1M count=64 dd if=/dev/zero of=flash0.img bs=1M count=64 dd if=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd of=flash0.img conv=notrunc Create a dedicated directory (folder) on your host system to contain this virtual machine. Download the latest  “Virtual” ISO file for…

《罪与罚》人物关系、情节整理

阶段和人物关系整理 罗季昂·罗曼内奇·拉斯柯尔尼科夫(昵称罗佳,罗季卡) 大学生 普尔赫莉雅·亚历山大罗芙娜·拉斯柯尔尼科娃 拉斯柯尔尼科夫的母亲 阿芙朵嘉·罗曼诺芙娜(昵称杜尼雅,杜涅奇卡) 拉斯柯尔尼科夫的妹妹 德米特利·普罗科菲伊奇·符拉祖米欣(简称拉祖米欣) 大学生,拉斯柯尔尼科夫的同学 谢敏·扎哈洛维奇·玛尔美拉朵夫 退职九品文官 卡捷莉娜·伊凡诺芙娜 玛尔美拉朵夫的妻子 索菲雅·谢敏诺芙娜·玛尔美拉朵娃(昵称索尼雅,索涅奇卡) 玛尔美拉朵夫的女儿 波丽娜(昵称波莉卡,波连卡,波丽雅) 卡捷莉娜与前夫生的长女 阿辽娜·伊凡诺芙娜 放高利贷的老太婆 丽扎维达·伊凡诺芙娜 阿辽娜的妹妹 阿尔卡吉·伊凡诺维奇·斯维德利盖洛夫 地主 玛尔法·彼得罗芙娜·斯维德利盖洛娃 斯维德利盖洛夫的妻子 彼得·彼得罗维奇·卢仁律师 杜尼雅的未婚夫 安德烈·谢敏诺维奇·列别齐亚特尼科夫 卢仁的朋友 普拉斯科维雅·巴甫洛芙娜(昵称巴宪卡) 拉斯柯尔尼科夫的女房东 娜斯达霞(昵称娜斯达西尤希卡) 女仆 阿玛丽雅·伊凡诺芙娜·里普威赫节尔 玛尔美拉朵夫家的女...

Understanding the LLVM Compiler

Components of LLVM: LLVM is designed with a three-phase architecture: Frontend, Middle-end, and Backend. Each component plays a crucial role in translating high-level source code into machine-executable code, while allowing modularity and optimizations across different languages and architectures. 1. Frontend The frontend is responsible for: Parsing the high-level source code (written in languages like C, C++, Rust, etc.). Checking for syntax and semantic correctness. Generating the LLVM Intermediate Representation (IR), which is an abstract, platform-independent code representation. Key Processes in the Frontend: Lexical Analysis (Tokenization): The source code is broken into meaningful chunks called tokens (e.g.,…

【计算机体系结构】Tomasulo算法

1、数据冒险 数据相关有四种,分别是RAR、WAR、WAW、RAW。其中“RAR”不会影响指令的执行,所以提数据相关的时候一般忽略,而WAR、WAW、RAW的重要差别就出在“数据依赖”上。“WAR”和“WAW”这两种数据相关其实没有数据依赖,即发生冒险的指令之间其实没有数据流动,通过寄存器重命名就可以消除冒险。“RAW”冒险则无法解决,因为后序指令读取的数据由前序指令算得,这个过程有明确的数据依赖。 2、Tomasulo算法 Tomasulo是计算机硬件架构的一种指令动态调度算法,其通过寄存器重命名消除了假数据冒险,提高了机器的乱序性能。Tomasulo算法的调度分为三个步骤:发射、执行、写回。 Tomasulo算法的实现结构 发射:Tomasulo算法是顺序发射的,即指令按照程序中的顺序一条接一条被发射到保留站。判断能否发射的唯一标准是指令对应通路的保留站是否有空余位置,只要保留站有空余,就可以把指令发射到保留站中。周期结束时会更新保留站和寄存器结果状态表,如果指令有可以读取的数据,就会立刻拷贝到保留站中;寄存器结果状态表中总是存有最新的值,即如果后...