OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [binutils-2.20.1/] [gas/] [testsuite/] [gas/] [score/] [arith_32.s] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
/*
2
 * tests for arithmetic instruction relaxation
3
 *
4
 * Author: libin
5
 */
6
 
7
.include "relaxation_macro.h"
8
 
9
.macro _arith_op_pattern insn insn1
10
  insn_32 "\insn r0, r0, r15"
11
 
12
  tran_16_32 "\insn! r0, r15", "\insn r0, r0, r15"
13
 
14
  /* shouldn't alter */
15
  .set r1
16
  insn_32 "\insn1  r0,  r0,  r15"
17
  insn_32 "\insn   r0,  r0,  r16"
18
  insn_32 "\insn   r16, r16, r0"
19
  insn_32 "\insn   r16, r16, r17"
20
  insn_32 "\insn   r0,  r1,  r2"
21
.endm
22
 
23
.text
24
/* add rD,rA,rB -> add! rD,rA */
25
_arith_op_pattern "add", "add.c"
26
 
27
/* sub rD,rA,rB -> sub rD,rA */
28
_arith_op_pattern "sub", "sub.c"
29
 
30
/* addi rD,SImm16 -> addi! rD,SImm6 */
31
insn_32 "addi r0,  -32"
32
insn_32 "addi r0,  31"
33
insn_32 "addi r15, -32"
34
insn_32 "addi r15, 31"
35
 
36
tran_16_32 "addi! r0,-32", "addi r0,-32"
37
 
38
/* shouldn't alter */
39
insn_32 "addi.c r0,  -32"
40
insn_32 "addi   r0,  -33"
41
insn_32 "addi   r0,  32"
42
insn_32 "addi   r16, -32"
43
insn_32 "addi   r16, 31"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.