summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortwinaphex2016-08-08 22:19:32 +0200
committertwinaphex2016-08-08 22:19:32 +0200
commit56ad88f3c4720b83617925b4775d6f11580ac1bf (patch)
tree09bea32a617d11e2f62246c9a7612f7c5d95f528 /src
parent474c3225f71c9edc2ac2af2cef58c80f914ec0cc (diff)
downloadsnes9x2002-56ad88f3c4720b83617925b4775d6f11580ac1bf.tar.gz
snes9x2002-56ad88f3c4720b83617925b4775d6f11580ac1bf.tar.bz2
snes9x2002-56ad88f3c4720b83617925b4775d6f11580ac1bf.zip
Take out register keyword
Diffstat (limited to 'src')
-rw-r--r--src/asmmemfuncs.h4
-rw-r--r--src/gfx16.c24
-rw-r--r--src/memmap.c14
-rw-r--r--src/soundux.c6
-rw-r--r--src/tile16.h4
-rw-r--r--src/tile16fsub1_2.c4
6 files changed, 28 insertions, 28 deletions
diff --git a/src/asmmemfuncs.h b/src/asmmemfuncs.h
index 9d70b15..6fe7853 100644
--- a/src/asmmemfuncs.h
+++ b/src/asmmemfuncs.h
@@ -3,7 +3,7 @@
#if defined(ARM_ASM)
#define memset32(_dst, _c, _count) \
-({ uint32_t *dst = (_dst); register uint32_t c __asm__ ("r7") = (_c); int count = (_count); register uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
+({ uint32_t *dst = (_dst); uint32_t c __asm__ ("r7") = (_c); int count = (_count); uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #4\n" \
" blt 2f\n" \
@@ -36,7 +36,7 @@
})
#define memset16(_dst, _c, _count) \
-({ uint16_t *dst = (_dst); register uint16_t c __asm__ ("r7") = (_c); int count = (_count); register uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
+({ uint16_t *dst = (_dst); uint16_t c __asm__ ("r7") = (_c); int count = (_count); uint32_t dummy0 __asm__ ("r4"), dummy1 __asm__ ("r5"), dummy2 __asm__ ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #2\n" \
" blt 3f\n" \
diff --git a/src/gfx16.c b/src/gfx16.c
index 38da4d7..68d832d 100644
--- a/src/gfx16.c
+++ b/src/gfx16.c
@@ -246,8 +246,8 @@ void DrawHiResTile16(uint32 Tile, uint32 Offset,
bool8_32 S9xGraphicsInit()
{
- register uint32 PixelOdd = 1;
- register uint32 PixelEven = 2;
+ uint32 PixelOdd = 1;
+ uint32 PixelEven = 2;
#ifdef GFX_MULTI_FORMAT
if (GFX.BuildPixel == NULL)
@@ -257,11 +257,11 @@ bool8_32 S9xGraphicsInit()
uint8 bitshift;
for (bitshift = 0; bitshift < 4; bitshift++)
{
- register int i;
+ int i;
for (i = 0; i < 16; i++)
{
- register uint32 h = 0;
- register uint32 l = 0;
+ uint32 h = 0;
+ uint32 l = 0;
#if defined(MSB_FIRST)
if (i & 8)
@@ -1982,7 +1982,7 @@ void DrawBackground_8(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2)
if (Count > Width) Count = Width;
s -= Offset;
//uint32 Tile = READ_2BYTES(t);
- register uint32 Tile = *(t++);
+ uint32 Tile = *(t++);
if (Tile != TileBlank)
{
GFX.Z1 = GFX.Z2 = depths [(Tile & 0x2000) >> 13];
@@ -2001,7 +2001,7 @@ void DrawBackground_8(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2)
for (C = Count >> 3; C > 0; s += 8, Quot++, C--)
{
//uint32 Tile = READ_2BYTES(t);
- register uint32 Tile = *(t++);
+ uint32 Tile = *(t++);
if (Tile != TileBlank)
{
GFX.Z1 = GFX.Z2 = depths [(Tile & 0x2000) >> 13];
@@ -2017,7 +2017,7 @@ void DrawBackground_8(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2)
if (Count & 7)
{
//uint32 Tile = READ_2BYTES(t);
- register uint32 Tile = *t;
+ uint32 Tile = *t;
if (Tile != TileBlank)
{
GFX.Z1 = GFX.Z2 = depths [(Tile & 0x2000) >> 13];
@@ -2157,7 +2157,7 @@ void DrawBackground_16(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2)
uint32 Width = Right - Left;
- register uint32 Tile;
+ uint32 Tile;
if (Quot & 1)
{
Tile = *(t++);
@@ -3042,7 +3042,7 @@ _ROP_##rop##half \
{
//if (IPPU.Clip [0].Right [c][5] > IPPU.Clip [0].Left [c][5])
//{
- register int width = IPPU.Clip [0].Right [c][5] - IPPU.Clip [0].Left [c][5];
+ int width = IPPU.Clip [0].Right [c][5] - IPPU.Clip [0].Left [c][5];
if (width <= 0) continue;
__asm__ volatile(
@@ -3116,7 +3116,7 @@ static void S9xUpdateScreenNoTransparency() // ~30-50ms! (called from FLUSH_RED
uint32 black = BLACK | (BLACK << 16);
// get back colour to be used in clearing the screen
- register uint32 back;
+ uint32 back;
if (!(GFX.r2131 & 0x80) && (GFX.r2131 & 0x20) &&
(PPU.FixedColourRed || PPU.FixedColourGreen || PPU.FixedColourBlue))
{
@@ -3138,7 +3138,7 @@ static void S9xUpdateScreenNoTransparency() // ~30-50ms! (called from FLUSH_RED
}
// now clear all graphics lines which are being updated using the back colour
- register uint32 y;
+ uint32 y;
for (y = starty; y <= endy; y++)
{
memset32((uint32_t*)(GFX.Screen + y * GFX_PITCH), back,
diff --git a/src/memmap.c b/src/memmap.c
index 47bba48..26a9889 100644
--- a/src/memmap.c
+++ b/src/memmap.c
@@ -2541,12 +2541,12 @@ const uint32 crc32Table[256] = {
};
//CRC32 for char arrays
-uint32 caCRC32(uint8 *array, uint32 size) {
- register uint32 crc32 = 0xFFFFFFFF;
- register uint32 i;
- for (i = 0; i < size; i++) {
- crc32 = ((crc32 >> 8) & 0x00FFFFFF) ^ crc32Table[(crc32 ^ array[i]) & 0xFF];
- }
- return ~crc32;
+uint32 caCRC32(uint8 *array, uint32 size)
+{
+ uint32 crc32 = 0xFFFFFFFF;
+ uint32 i;
+ for (i = 0; i < size; i++)
+ crc32 = ((crc32 >> 8) & 0x00FFFFFF) ^ crc32Table[(crc32 ^ array[i]) & 0xFF];
+ return ~crc32;
}
#include "getset.h"
diff --git a/src/soundux.c b/src/soundux.c
index 4649d91..9c704fd 100644
--- a/src/soundux.c
+++ b/src/soundux.c
@@ -219,7 +219,7 @@ void S9xSetSoundSample(int channel, uint16 sample_number)
#else
void S9xSetSoundSample(int channel, uint16 sample_number)
{
- register Channel* ch = &SoundData.channels[channel];
+ Channel* ch = &SoundData.channels[channel];
if (ch->state != SOUND_SILENT &&
sample_number != ch->sample_number)
@@ -977,7 +977,7 @@ void S9xMixSamplesO(signed short* buffer, int sample_count, int sample_offset)
// ... with filter defined.
for (J = 0; J < sample_count; J += 2)
{
- register int E = Echo [SoundData.echo_ptr];
+ int E = Echo [SoundData.echo_ptr];
Loop [(Z - 0) & 15] = E;
@@ -1039,7 +1039,7 @@ void S9xMixSamplesO(signed short* buffer, int sample_count, int sample_offset)
// ... with filter defined
for (J = 0; J < sample_count; J++)
{
- register int E = Echo [SoundData.echo_ptr];
+ int E = Echo [SoundData.echo_ptr];
Loop [(Z - 0) & 7] = E;
E = E * FilterTaps [0];
diff --git a/src/tile16.h b/src/tile16.h
index 4650f40..0f9ea3e 100644
--- a/src/tile16.h
+++ b/src/tile16.h
@@ -71,7 +71,7 @@ extern uint32 TileBlank;
GFX.ScreenColors = &GFX.ScreenColorsPre[(Tile & GFX.PaletteMask) >> GFX.PaletteShift];
#define RENDER_TILE(NORMAL, FLIPPED, N) \
- register int inc; \
+ int inc; \
if (!(Tile & V_FLIP)){ \
bp = pCache + StartLine; \
inc = 8; \
@@ -123,7 +123,7 @@ extern uint32 TileBlank;
#define RENDER_CLIPPED_TILE(NORMAL, FLIPPED, N) \
- register int inc; \
+ int inc; \
if (Tile & V_FLIP){ \
bp = pCache + 56 - StartLine; \
inc = -8; \
diff --git a/src/tile16fsub1_2.c b/src/tile16fsub1_2.c
index 0baf36e..1124001 100644
--- a/src/tile16fsub1_2.c
+++ b/src/tile16fsub1_2.c
@@ -68,7 +68,7 @@ void DrawTile16FixedSub1_2(uint32 Tile, uint32 Offset, uint32 StartLine,
uint32 LineCount)
{
TILE_PREAMBLE
- register uint8* bp;
+ uint8* bp;
RENDER_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4)
}
@@ -78,7 +78,7 @@ void DrawClippedTile16FixedSub1_2(uint32 Tile, uint32 Offset,
uint32 StartLine, uint32 LineCount)
{
TILE_PREAMBLE
- register uint8* bp;
+ uint8* bp;
TILE_CLIP_PREAMBLE
RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUBF1_2,