Subversion Repositories HelenOS

Rev

Rev 3774 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3774 Rev 4490
Line 238... Line 238...
238
 *
238
 *
239
 * @param i Region register index.
239
 * @param i Region register index.
240
 *
240
 *
241
 * @return Current contents of rr[i].
241
 * @return Current contents of rr[i].
242
 */
242
 */
243
static inline uint64_t rr_read(index_t i)
243
static inline uint64_t rr_read(size_t i)
244
{
244
{
245
    uint64_t ret;
245
    uint64_t ret;
246
    ASSERT(i < REGION_REGISTERS);
246
    ASSERT(i < REGION_REGISTERS);
247
    asm volatile ("mov %0 = rr[%1]\n" : "=r" (ret) : "r" (i << VRN_SHIFT));
247
    asm volatile ("mov %0 = rr[%1]\n" : "=r" (ret) : "r" (i << VRN_SHIFT));
248
    return ret;
248
    return ret;
Line 251... Line 251...
251
/** Write Region Register.
251
/** Write Region Register.
252
 *
252
 *
253
 * @param i Region register index.
253
 * @param i Region register index.
254
 * @param v Value to be written to rr[i].
254
 * @param v Value to be written to rr[i].
255
 */
255
 */
256
static inline void rr_write(index_t i, uint64_t v)
256
static inline void rr_write(size_t i, uint64_t v)
257
{
257
{
258
    ASSERT(i < REGION_REGISTERS);
258
    ASSERT(i < REGION_REGISTERS);
259
    asm volatile (
259
    asm volatile (
260
        "mov rr[%0] = %1\n"
260
        "mov rr[%0] = %1\n"
261
        :
261
        :