cksystemsteaching / selfie

An educational software system of a tiny self-compiling C compiler, a tiny self-executing RISC-V emulator, and a tiny self-hosting RISC-V hypervisor.
http://selfie.cs.uni-salzburg.at
BSD 2-Clause "Simplified" License
2.39k stars 312 forks source link

Add a new test for Bitwise AND/OR/NOT #104

Closed ChristianMoesl closed 5 years ago

ChristianMoesl commented 5 years ago

Bitwise AND/OR operators should be added to the C* language and emulator support for the corresponding RISC-V instruction should be provided.

This test should verify:

ckirsch commented 5 years ago

Let's include bitwise NOT (~) as well. Its precedence is interesting.

ckirsch commented 5 years ago

~ should be mapped to XORI RISC-V.

ChristianMoesl commented 5 years ago

Ok, I am on it. 👍

ckirsch commented 5 years ago

Thanks! This is a cool assignment. It challenges the students to take what they learned for bitwise shifting one step further.