m5op_arm.S (9660:5ca6098b9560) m5op_arm.S (9686:13a4419f09c5)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

47.thumb
48#endif
49
50#include "m5ops.h"
51
52.text
53
54.macro simple_op name, func, subfunc
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

47.thumb
48#endif
49
50#include "m5ops.h"
51
52.text
53
54.macro simple_op name, func, subfunc
55 .align 2
55 .globl \name
56\name:
57 /* First, try to trap into m5 using the m5-kvm hypercall
58 * hack. The bxj will become a branch to the fallback code
59 * if it is executed in the normal m5 environment.
60 */
61 push {lr}
56 .globl \name
57\name:
58 /* First, try to trap into m5 using the m5-kvm hypercall
59 * hack. The bxj will become a branch to the fallback code
60 * if it is executed in the normal m5 environment.
61 */
62 push {lr}
62 ldr lr, =1f
63#ifdef __thumb__
64 adr lr, 1f+1
65#else
66 adr lr, 1f
67#endif
63 ldr ip, =((((\func) & 0xFF) << 8) | ((\subfunc) & 0xFF))
64 bxj lr
65 pop {pc}
66
67 /* Old-style m5 pseudo instruction using CP1 accesses */
681:
69#ifdef __thumb__
70 .short 0xEE00 | \func
71 .short 0x0110 | (\subfunc << 12)
72#else
68 ldr ip, =((((\func) & 0xFF) << 8) | ((\subfunc) & 0xFF))
69 bxj lr
70 pop {pc}
71
72 /* Old-style m5 pseudo instruction using CP1 accesses */
731:
74#ifdef __thumb__
75 .short 0xEE00 | \func
76 .short 0x0110 | (\subfunc << 12)
77#else
73#define INST(op, ra, rb, func) \
74 .long (0xEE000110 | (\func << 16) | (\subfunc << 12)
78 .long (0xEE000110 | (\func << 16) | (\subfunc << 12))
75#endif
76 pop {pc}
77.endm
78
79#define SIMPLE_OP(name, func, subfunc) simple_op name, func, subfunc
80
81SIMPLE_OP(arm, arm_func, 0)
82SIMPLE_OP(quiesce, quiesce_func, 0)

--- 37 unchanged lines hidden ---
79#endif
80 pop {pc}
81.endm
82
83#define SIMPLE_OP(name, func, subfunc) simple_op name, func, subfunc
84
85SIMPLE_OP(arm, arm_func, 0)
86SIMPLE_OP(quiesce, quiesce_func, 0)

--- 37 unchanged lines hidden ---