increment_and_decrement.py (7087:fb8d5786ff30) increment_and_decrement.py (8610:9bdd52a2214c)
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

53 rdip t7
54 ldst t1, seg, riprel, disp
55 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
56 st t1, seg, riprel, disp
57};
58
59def macroop INC_LOCKED_M
60{
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

53 rdip t7
54 ldst t1, seg, riprel, disp
55 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
56 st t1, seg, riprel, disp
57};
58
59def macroop INC_LOCKED_M
60{
61 mfence
61 ldstl t1, seg, sib, disp
62 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
63 stul t1, seg, sib, disp
62 ldstl t1, seg, sib, disp
63 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
64 stul t1, seg, sib, disp
65 mfence
64};
65
66def macroop INC_LOCKED_P
67{
68 rdip t7
66};
67
68def macroop INC_LOCKED_P
69{
70 rdip t7
71 mfence
69 ldstl t1, seg, riprel, disp
70 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
71 stul t1, seg, riprel, disp
72 ldstl t1, seg, riprel, disp
73 addi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
74 stul t1, seg, riprel, disp
75 mfence
72};
73
74def macroop DEC_R
75{
76 subi reg, reg, 1, flags=(OF, SF, ZF, AF, PF)
77};
78
79def macroop DEC_M

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

88 rdip t7
89 ldst t1, seg, riprel, disp
90 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
91 st t1, seg, riprel, disp
92};
93
94def macroop DEC_LOCKED_M
95{
76};
77
78def macroop DEC_R
79{
80 subi reg, reg, 1, flags=(OF, SF, ZF, AF, PF)
81};
82
83def macroop DEC_M

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

92 rdip t7
93 ldst t1, seg, riprel, disp
94 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
95 st t1, seg, riprel, disp
96};
97
98def macroop DEC_LOCKED_M
99{
100 mfence
96 ldstl t1, seg, sib, disp
97 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
98 stul t1, seg, sib, disp
101 ldstl t1, seg, sib, disp
102 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
103 stul t1, seg, sib, disp
104 mfence
99};
100
101def macroop DEC_LOCKED_P
102{
103 rdip t7
105};
106
107def macroop DEC_LOCKED_P
108{
109 rdip t7
110 mfence
104 ldstl t1, seg, riprel, disp
105 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
106 stul t1, seg, riprel, disp
111 ldstl t1, seg, riprel, disp
112 subi t1, t1, 1, flags=(OF, SF, ZF, AF, PF)
113 stul t1, seg, riprel, disp
114 mfence
107};
108'''
115};
116'''