about summary refs log tree commit diff stats
path: root/test/arch/x86/unit/mn_pmaxu.py
blob: 08e54c03440ff31bf637acaa733f56b27591c8bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env python
from asm_test import Asm_Test
import sys

class Test_PMAXU(Asm_Test):
    TXT = '''
    main:
       CALL   next
       .byte 0x88, 0x76, 0x66, 0x54, 0x44, 0x32, 0x00, 0x10
       .byte 0x87, 0x77, 0x66, 0x55, 0x40, 0x33, 0x22, 0x11
    next:
       POP    EBP
       MOVQ   MM0, QWORD PTR [EBP]
       MOVQ   MM1, MM0
       PMAXUB MM1, QWORD PTR [EBP+0x8]
       RET
    '''

    def check(self):
        assert self.myjit.cpu.MM0 == 0x1000324454667688
        assert self.myjit.cpu.MM1 == 0x1122334455667788


if __name__ == "__main__":
    [test()() for test in [Test_PMAXU]]