Compare commits

...

3 commits

Author SHA1 Message Date
Stephan I. Böttcher
89aacc5041 Merge branch 'master' of forge.bexus.org:Stephan/irena-arm 2024-11-08 15:14:10 +01:00
stephan
4d486e6c4f isr: add "memory" to CPSR asm
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9134 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-08 11:51:20 +00:00
stephan
3f9d0b7468 parser: avoid non-const string
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9133 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-08 11:50:12 +00:00
2 changed files with 3 additions and 6 deletions

4
isr.h
View file

@ -8,13 +8,13 @@ void init_vic(void);
static inline unsigned int cpsr(void) static inline unsigned int cpsr(void)
{ {
unsigned int r; unsigned int r;
__asm__ __volatile__ ("MRS %0, CPSR" : "=r" (r)); __asm__ __volatile__ ("MRS %0, CPSR" : "=r" (r) :: "memory");
return r; return r;
} }
static inline void cpsr_c(unsigned int r) static inline void cpsr_c(unsigned int r)
{ {
__asm__ __volatile__ ("MSR CPSR_c, %0" :: "r" (r)); __asm__ __volatile__ ("MSR CPSR_c, %0" :: "r" (r) : "memory");
} }
static inline unsigned int disable_irq(unsigned int flag) static inline unsigned int disable_irq(unsigned int flag)

View file

@ -62,10 +62,7 @@ error_msg_t expect_char(struct command *cmd, char what)
{ {
if (parse_char(cmd, what)) if (parse_char(cmd, what))
return 0; return 0;
static char mes[] = ". expected\n"; return error_printf(709, "%c expected\n", what);
static ERRORMESSAGE(error, 709, mes);
mes[0] = what;
return &error;
} }
const struct keywords *parse_keyword(struct command *cmd, const struct keywords *table) const struct keywords *parse_keyword(struct command *cmd, const struct keywords *table)