Fixed the define in config.h and more tagcache alignment issues.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9266 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e9721bff58
commit
a33d5d7926
2 changed files with 13 additions and 2 deletions
|
@ -783,7 +783,7 @@ static bool tempbuf_unique_insert(char *str, int id)
|
||||||
if (!strcasecmp(str, index[i].str))
|
if (!strcasecmp(str, index[i].str))
|
||||||
{
|
{
|
||||||
tempbuf_left -= sizeof(struct tempbuf_id);
|
tempbuf_left -= sizeof(struct tempbuf_id);
|
||||||
if (tempbuf_left < 0)
|
if (tempbuf_left - 4 < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
idp = index[i].id;
|
idp = index[i].id;
|
||||||
|
@ -791,6 +791,17 @@ static bool tempbuf_unique_insert(char *str, int id)
|
||||||
idp = idp->next;
|
idp = idp->next;
|
||||||
|
|
||||||
idp->next = (struct tempbuf_id *)&tempbuf[tempbuf_pos];
|
idp->next = (struct tempbuf_id *)&tempbuf[tempbuf_pos];
|
||||||
|
#ifdef ROCKBOX_STRICT_ALIGN
|
||||||
|
/* Make sure the entry is long aligned. */
|
||||||
|
if ((long)idp->next & 0x03)
|
||||||
|
{
|
||||||
|
int fix = 4 - ((long)idp->next & 0x03);
|
||||||
|
tempbuf_left -= fix;
|
||||||
|
tempbuf_pos += fix;
|
||||||
|
idp->next = (struct tempbuf_id *)((
|
||||||
|
(long)idp->next & ~0x03) + 0x04);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
idp = idp->next;
|
idp = idp->next;
|
||||||
idp->id = id;
|
idp->id = id;
|
||||||
idp->next = NULL;
|
idp->next = NULL;
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Determine if accesses should be strictly long aligned. */
|
/* Determine if accesses should be strictly long aligned. */
|
||||||
#if (CONFIG_CPU == SH7034) || (CONFIG_CPU == CPU_ARM)
|
#if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
|
||||||
#define ROCKBOX_STRICT_ALIGN 1
|
#define ROCKBOX_STRICT_ALIGN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue