Last change
on this file since 455 was 331, checked in by coas-nagasima, 6 years ago |
prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc
|
File size:
677 bytes
|
Rev | Line | |
---|
[331] | 1 | #include <stdio.h>
|
---|
| 2 |
|
---|
| 3 | #if defined _WIN32 && !defined __TINYC__
|
---|
| 4 | # define _ "_"
|
---|
| 5 | #else
|
---|
| 6 | # define _
|
---|
| 7 | #endif
|
---|
| 8 |
|
---|
| 9 | static int x1_c(void)
|
---|
| 10 | {
|
---|
| 11 | printf(" x1");
|
---|
| 12 | return 1;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | asm(".text;"_"x1: call "_"x1_c; ret");
|
---|
| 16 |
|
---|
| 17 | void callx4(void);
|
---|
| 18 | void callx5_again(void);
|
---|
| 19 |
|
---|
| 20 | void x6()
|
---|
| 21 | {
|
---|
| 22 | printf(" x6-1");
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | int main(int argc, char *argv[])
|
---|
| 26 | {
|
---|
| 27 | printf("*");
|
---|
| 28 | asm("call "_"x1");
|
---|
| 29 | asm("call "_"x2");
|
---|
| 30 | asm("call "_"x3");
|
---|
| 31 | callx4();
|
---|
| 32 | asm("call "_"x5");
|
---|
| 33 | callx5_again();
|
---|
| 34 | x6();
|
---|
| 35 | printf(" *\n");
|
---|
| 36 | return 0;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | static
|
---|
| 40 | int x2(void)
|
---|
| 41 | {
|
---|
| 42 | printf(" x2");
|
---|
| 43 | return 2;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | extern int x3(void);
|
---|
| 47 |
|
---|
| 48 | void x4(void)
|
---|
| 49 | {
|
---|
| 50 | printf(" x4");
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | void x5(void);
|
---|
| 54 | void x5(void)
|
---|
| 55 | {
|
---|
| 56 | printf(" x5");
|
---|
| 57 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.