Rev 1790 | Rev 1860 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1790 | Rev 1856 | ||
---|---|---|---|
Line 104... | Line 104... | ||
104 | mov %g0, %o0 ! return 0 on failure |
104 | mov %g0, %o0 ! return 0 on failure |
105 | 105 | ||
106 | memsetb: |
106 | memsetb: |
107 | b _memsetb |
107 | b _memsetb |
108 | nop |
108 | nop |
- | 109 | ||
- | 110 | ||
- | 111 | .macro WRITE_ALTERNATE_REGISTER reg, bit |
|
- | 112 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
|
- | 113 | rdpr %pstate, %l0 |
|
- | 114 | wrpr %l0, \bit, %pstate |
|
- | 115 | mov %i0, \reg |
|
- | 116 | wrpr %l0, 0, %pstate |
|
- | 117 | ret |
|
- | 118 | restore |
|
- | 119 | .endm |
|
- | 120 | ||
- | 121 | .macro READ_ALTERNATE_REGISTER reg, bit |
|
- | 122 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
|
- | 123 | rdpr %pstate, %l0 |
|
- | 124 | wrpr %l0, \bit, %pstate |
|
- | 125 | mov \reg, %i0 |
|
- | 126 | wrpr %l0, 0, %pstate |
|
- | 127 | ret |
|
- | 128 | restore |
|
- | 129 | .endm |
|
- | 130 | ||
- | 131 | .global write_to_ag_g6 |
|
- | 132 | write_to_ag_g6: |
|
- | 133 | WRITE_ALTERNATE_REGISTER %g6, PSTATE_AG_BIT |
|
- | 134 | ||
- | 135 | .global write_to_ag_g7 |
|
- | 136 | write_to_ag_g7: |
|
- | 137 | WRITE_ALTERNATE_REGISTER %g7, PSTATE_AG_BIT |
|
- | 138 | ||
- | 139 | .global write_to_ig_g6 |
|
- | 140 | write_to_ig_g6: |
|
- | 141 | WRITE_ALTERNATE_REGISTER %g6, PSTATE_IG_BIT |
|
- | 142 | ||
- | 143 | .global read_from_ag_g7 |
|
- | 144 | read_from_ag_g7: |
|
- | 145 | READ_ALTERNATE_REGISTER %g7, PSTATE_AG_BIT |