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:
940 bytes
|
Line | |
---|
1 | #include <stdio.h>
|
---|
2 | #include <stdlib.h>
|
---|
3 | asm (
|
---|
4 | ".text;"
|
---|
5 | ".globl _us;.globl _ss;.globl _uc;.globl _sc;"
|
---|
6 | "_us:;_ss:;_uc:;_sc:;"
|
---|
7 | "movl $0x1234ABCD, %eax;"
|
---|
8 | "ret;"
|
---|
9 | );
|
---|
10 |
|
---|
11 | #if 1
|
---|
12 | #define us _us
|
---|
13 | #define ss _ss
|
---|
14 | #define uc _uc
|
---|
15 | #define sc _sc
|
---|
16 | #endif
|
---|
17 |
|
---|
18 | int main()
|
---|
19 | {
|
---|
20 | unsigned short us(void);
|
---|
21 | short ss(void);
|
---|
22 | unsigned char uc(void);
|
---|
23 | signed char sc(void);
|
---|
24 |
|
---|
25 | unsigned short (*fpus)(void) = us;
|
---|
26 | short (*fpss)(void) = ss;
|
---|
27 | unsigned char (*fpuc)(void) = uc;
|
---|
28 | signed char (*fpsc)(void) = sc;
|
---|
29 |
|
---|
30 | printf("%08X %08X\n", us() + 1, fpus() + 1);
|
---|
31 | printf("%08X %08X\n", ss() + 1, fpss() + 1);
|
---|
32 | printf("%08X %08X\n", uc() + 1, fpuc() + 1);
|
---|
33 | printf("%08X %08X\n", sc() + 1, fpsc() + 1);
|
---|
34 | printf("\n");
|
---|
35 | printf("%08X %08X\n", fpus() + 1, us() + 1);
|
---|
36 | printf("%08X %08X\n", fpss() + 1, ss() + 1);
|
---|
37 | printf("%08X %08X\n", fpuc() + 1, uc() + 1);
|
---|
38 | printf("%08X %08X\n", fpsc() + 1, sc() + 1);
|
---|
39 |
|
---|
40 | return 0;
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.