save_and_restore_x87_environment.py (9895:a1f661af9dc9) save_and_restore_x87_environment.py (10899:b8b8ad2c72dd)
1# Copyright (c) 2013 Andreas Sandberg
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 22 unchanged lines hidden (view full) ---

31# t1, t2 == temporaries
32
33fldenvTemplate = """
34 ld t1, seg, %(mode)s, "DISPLACEMENT + 0", dataSize=2
35 wrval fcw, t1
36
37 ld t1, seg, %(mode)s, "DISPLACEMENT + 4", dataSize=2
38 wrval fsw, t1
1# Copyright (c) 2013 Andreas Sandberg
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 22 unchanged lines hidden (view full) ---

31# t1, t2 == temporaries
32
33fldenvTemplate = """
34 ld t1, seg, %(mode)s, "DISPLACEMENT + 0", dataSize=2
35 wrval fcw, t1
36
37 ld t1, seg, %(mode)s, "DISPLACEMENT + 4", dataSize=2
38 wrval fsw, t1
39 srli t1, t1, 11, dataSize=2
40 andi t1, t1, 0x7, dataSize=2
41 wrval "InstRegIndex(MISCREG_X87_TOP)", t1
42
43 ld t1, seg, %(mode)s, "DISPLACEMENT + 8", dataSize=2
44 wrval ftw, t1
45
46 ld t1, seg, %(mode)s, "DISPLACEMENT + 12", dataSize=4
47 wrval "InstRegIndex(MISCREG_FIOFF)", t1
48
49 ld t1, seg, %(mode)s, "DISPLACEMENT + 16 + 0", dataSize=2

--- 62 unchanged lines hidden ---
39
40 ld t1, seg, %(mode)s, "DISPLACEMENT + 8", dataSize=2
41 wrval ftw, t1
42
43 ld t1, seg, %(mode)s, "DISPLACEMENT + 12", dataSize=4
44 wrval "InstRegIndex(MISCREG_FIOFF)", t1
45
46 ld t1, seg, %(mode)s, "DISPLACEMENT + 16 + 0", dataSize=2

--- 62 unchanged lines hidden ---