Commit MetaInfo

Revision5aa2f1573e0c2ba364776f4d237ea311069200dc (tree)
Time2018-07-13 16:40:26
AuthorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

h8300: gcc-8.1 fix

Since gcc 8.1 does not generate an assignment statement to er 0,
we had to explicitly write it.

Change Summary

Incremental Difference

--- a/arch/h8300/kernel/sim-console.c
+++ b/arch/h8300/kernel/sim-console.c
@@ -13,12 +13,13 @@
1313
1414 static void sim_write(struct console *con, const char *s, unsigned n)
1515 {
16- register const int fd __asm__("er0") = 1; /* stdout */
1716 register const char *_ptr __asm__("er1") = s;
1817 register const unsigned _len __asm__("er2") = n;
1918
20- __asm__(".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
21- : : "g"(fd), "g"(_ptr), "g"(_len));
19+ __asm__("sub.l er0,er0\n\t" /* er0 = 1 (stdout) */
20+ "inc.l #1,er0\n\t"
21+ ".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */
22+ : : "g"(_ptr), "g"(_len):"er0");
2223 }
2324
2425 static int __init sim_setup(struct earlycon_device *device, const char *opt)
Show on old repository browser