Added some more instructions in EEAssembler.

This commit is contained in:
Jean-Philip Desjardins 2014-09-29 01:59:43 -04:00
parent 720d8086d2
commit ce65c64e59
2 changed files with 28 additions and 0 deletions

View File

@ -36,6 +36,30 @@ void CEEAssembler::MTLO1(unsigned int rs)
m_ptr++;
}
void CEEAssembler::PADDW(unsigned int rd, unsigned int rs, unsigned int rt)
{
(*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x00) << 6) | (0x08);
m_ptr++;
}
void CEEAssembler::PEXCH(unsigned int rd, unsigned int rt)
{
(*m_ptr) = ((0x1C) << 26) | (rt << 16) | (rd << 11) | ((0x1A) << 6) | (0x29);
m_ptr++;
}
void CEEAssembler::PEXCW(unsigned int rd, unsigned int rt)
{
(*m_ptr) = ((0x1C) << 26) | (rt << 16) | (rd << 11) | ((0x1E) << 6) | (0x29);
m_ptr++;
}
void CEEAssembler::PPACW(unsigned int rd, unsigned int rs, unsigned int rt)
{
(*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x13) << 6) | (0x08);
m_ptr++;
}
void CEEAssembler::SQ(unsigned int rt, uint16 offset, unsigned int base)
{
(*m_ptr) = ((0x1F) << 26) | (base << 21) | (rt << 16) | offset;

View File

@ -12,5 +12,9 @@ public:
void MFLO1(unsigned int);
void MTHI1(unsigned int);
void MTLO1(unsigned int);
void PADDW(unsigned int, unsigned int, unsigned int);
void PEXCH(unsigned int, unsigned int);
void PEXCW(unsigned int, unsigned int);
void PPACW(unsigned int, unsigned int, unsigned int);
void SQ(unsigned int, uint16, unsigned int);
};