diff --git a/Coding-Style.md b/Coding-Style.md index f7d0f1c..ee201b7 100644 --- a/Coding-Style.md +++ b/Coding-Style.md @@ -23,4 +23,6 @@ We recommend to follow these guidelines when writing code for RPCS3. They aren't * Pointers to the datatype `T` are `mem_ptr_t`. * Pointers to the function `T (*)(t1 a1, t2 a2)` are `mem_func_ptr_t` * Allocate memory with *MemoryAllocator*. - * Don't forget to switch endianness: That is, allocate `u32` with `MemoryAllocator>` \ No newline at end of file + * Don't forget to switch endianness: That is, allocate `u32` with `MemoryAllocator>` +* Switch endianness on compile time if possible: + * When comparing the type `be_t x` with the constant `y`, use: `x.ToBE()` and `se32(y)` respectively to gain speed by switching the endianness of the constant in compilation time. \ No newline at end of file