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

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc
    from Rev 672 to Rev 673
    Reverse comparison

Rev 672 → Rev 673

/trunk/or1ksim/cpu/or32/or32.c
669,7 → 669,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
717,7 → 717,9
static unsigned long *
cover_insn (unsigned long *cur, int pass, unsigned int mask)
{
int best_first = 0, best_len = 0, i, last_match = -1, ninstr = 0;
int best_first = 0, last_match = -1, ninstr = 0;
unsigned int best_len = 0;
unsigned int i;
unsigned long cur_mask = mask;
unsigned long *next;
 
779,14 → 781,14
best_first, ninstr);
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
 
for (i = 0; i < (1 << (unsigned long) best_len); i++)
for (i = 0; i < (1UL << (unsigned long) best_len); i++)
{
int j;
unsigned long *c;
892,7 → 894,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
or32_debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
num_cur_op++;
1101,7 → 1103,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
 
/* Do sign extend if this is the right one. */
1156,7 → 1158,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/orpsocv2/sw/utils/or32-idecode/or32-dis.c
29,7 → 29,7
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define EXTEND28(x) ((x) & (unsigned long) 0x08000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND28(x) ((x) & 0x08000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
101,7 → 101,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
121,7 → 121,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
/trunk/orpsocv2/sw/utils/or32-idecode/or32-opc.c
487,7 → 487,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
590,15 → 590,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
710,7 → 710,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
num_cur_op++;
895,7 → 895,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
947,7 → 947,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/gnu-src/gdb-7.1/opcodes/or32-dis.c
28,7 → 28,7
#include <string.h>
#include <stdlib.h>
 
#define EXTEND29(x) ((x) & (unsigned long) 0x10000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND29(x) ((x) & 0x10000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
100,7 → 100,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
120,7 → 120,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
/trunk/gnu-src/gdb-7.1/opcodes/or32-opc.c
453,7 → 453,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
562,15 → 562,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
678,7 → 678,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
}
858,7 → 858,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
910,7 → 910,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/gnu-src/gdb-7.2/opcodes/or32-dis.c
28,7 → 28,7
#include <string.h>
#include <stdlib.h>
 
#define EXTEND29(x) ((x) & (unsigned long) 0x10000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND29(x) ((x) & 0x10000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
57,6 → 57,8
 
typedef void (*find_byte_func_type) (unsigned char *, unsigned long *);
 
/* Extract a field according to an opcode format string (see or32-opc.c)
* Sign extends those that are letter_signed() despite unsigned return type */
static unsigned long
or32_extract (char param_ch, char *enc_initial, unsigned long insn)
{
100,7 → 102,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
120,7 → 122,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
/trunk/gnu-src/gdb-7.2/opcodes/or32-opc.c
453,7 → 453,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
562,15 → 562,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
678,7 → 678,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
}
858,7 → 858,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
868,6 → 868,8
return imm;
}
 
/* Extract a field according to an opcode format string (see or32_opcodes)
* Note: a nearly identical function is also present in or32-dis.c */
static unsigned long
or32_extract (char param_ch, char *enc_initial, unsigned long insn)
{
910,7 → 912,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/gnu-src/binutils-2.18.50/opcodes/or32-dis.c
28,7 → 28,7
#include <string.h>
#include <stdlib.h>
 
#define EXTEND28(x) ((x) & (unsigned long) 0x08000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND28(x) ((x) & 0x08000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
100,7 → 100,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
120,7 → 120,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
157,12 → 157,6
ones = or32_extract ('1', encoding, insn);
zeros = or32_extract ('0', encoding, insn);
 
// Added 090430 - jb - fixed problem where upper 4 bytes of a 64-bit long weren't getting setup properly for comparison
// As a result, instructions weren't getting decoded properly
insn &= 0xffffffff;
ones &= 0xffffffff;
zeros &= 0xffffffff;
#if DEBUG
printf ("ones: %x \n", ones);
printf ("zeros: %x \n", zeros);
/trunk/gnu-src/binutils-2.18.50/opcodes/or32-opc.c
483,7 → 483,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
586,15 → 586,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
705,7 → 705,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
num_cur_op++;
890,7 → 890,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
942,7 → 942,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/gnu-src/gdb-6.8/opcodes/or32-dis.c
28,7 → 28,7
#include <string.h>
#include <stdlib.h>
 
#define EXTEND28(x) ((x) & (unsigned long) 0x08000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND28(x) ((x) & 0x08000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
100,7 → 100,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
120,7 → 120,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
157,12 → 157,6
ones = or32_extract ('1', encoding, insn);
zeros = or32_extract ('0', encoding, insn);
 
// Added 090430 - jb - fixed problem where upper 4 bytes of a 64-bit long weren't getting setup properly for comparison
// As a result, instructions weren't getting decoded properly
insn &= 0xffffffff;
ones &= 0xffffffff;
zeros &= 0xffffffff;
#if DEBUG
printf ("ones: %x \n", ones);
printf ("zeros: %x \n", zeros);
/trunk/gnu-src/gdb-6.8/opcodes/or32-opc.c
483,7 → 483,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
586,15 → 586,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
706,7 → 706,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
num_cur_op++;
891,7 → 891,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
943,7 → 943,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
/trunk/gnu-src/binutils-2.20.1/opcodes/or32-dis.c
28,7 → 28,7
#include <string.h>
#include <stdlib.h>
 
#define EXTEND28(x) ((x) & (unsigned long) 0x08000000 ? ((x) | (unsigned long) 0xf0000000) : ((x)))
#define EXTEND28(x) ((x) & 0x08000000UL ? ((x) | ~0x0fffffffUL) : ((x)))
 
/* Now find the four bytes of INSN_CH and put them in *INSN. */
 
100,7 → 100,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)
120,7 → 120,7
printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
ret |= -1L << letter_range(param_ch);
#if DEBUG
printf ("\n after conversion to signed: ret=%x\n", ret);
#endif
157,12 → 157,6
ones = or32_extract ('1', encoding, insn);
zeros = or32_extract ('0', encoding, insn);
 
// Added 090430 - jb - fixed problem where upper 4 bytes of a 64-bit long weren't getting setup properly for comparison
// As a result, instructions weren't getting decoded properly
insn &= 0xffffffff;
ones &= 0xffffffff;
zeros &= 0xffffffff;
#if DEBUG
printf ("ones: %x \n", ones);
printf ("zeros: %x \n", zeros);
/trunk/gnu-src/binutils-2.20.1/opcodes/or32-opc.c
483,7 → 483,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
}
enc++;
}
586,15 → 586,15
 
*cur = best_first;
cur++;
*cur = (1 << best_len) - 1;
*cur = (1UL << best_len) - 1;
cur++;
next = cur;
 
/* Allocate space for pointers. */
cur += 1 << best_len;
cur_mask = (1 << (unsigned long) best_len) - 1;
cur += 1UL << best_len;
cur_mask = (1UL << (unsigned long) best_len) - 1;
for (i = 0; i < ((unsigned) 1 << best_len); i++)
for (i = 0; i < (1U << best_len); i++)
{
unsigned int j;
unsigned long *c;
706,7 → 706,7
}
cur->type = type | shr;
cur->data = mask;
arg &= ~(((1 << mask) - 1) << shr);
arg &= ~(((1UL << mask) - 1) << shr);
debug (6, "|%08lX %08lX\n", cur->type, cur->data);
cur++;
num_cur_op++;
891,7 → 891,7
/* First truncate all bits above valid range for this letter
in case it is zero extend. */
letter_bits = letter_range (l);
mask = (1 << letter_bits) - 1;
mask = (1UL << letter_bits) - 1;
imm &= mask;
/* Do sign extend if this is the right one. */
943,7 → 943,7
{
opc_pos--;
if (param_ch == *enc)
ret |= 1 << opc_pos;
ret |= 1UL << opc_pos;
enc++;
}
else if (*enc == param_ch)

powered by: WebSVN 2.1.0

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