aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/utils.cpp
blob: 070dc2eb93ae478e06efc410e3d9e3551f5b8e54 (plain)
1
2
3
4
5
#include "utils.h"

std::uint32_t sign_extend(std::uint16_t v) {
    return ((v & 0x8000) ? 0xFFFF0000 : 0) | v;
}