Last active
December 7, 2018 02:40
-
-
Save baobao/a3609fd6e62f19fefaf998eaab04fb14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.method public hidebysig | |
instance int32 Main ( | |
int32 piyo, | |
int32 bar, | |
int32 foo, | |
int32 hoge, | |
int32 piyopiyo | |
) cil managed | |
{ | |
.maxstack 8 | |
// 第1引数をスタックに乗せる | |
IL_0000: ldarg.1 | |
// 第2引数をスタックに乗せる | |
IL_0001: ldarg.2 | |
// スタックに乗っている2つの値を加算した結果をスタックに乗せる | |
IL_0002: add | |
// 第3引数をスタックに乗せる | |
IL_0003: ldarg.3 | |
// スタックに乗っている第1引数と第2引数の加算値と第3引数を加算した結果をスタックに乗せる | |
IL_0004: add | |
// 第4引数からは変数名で取得するようだ | |
IL_0005: ldarg.s hoge | |
IL_0007: add | |
IL_0008: ldarg.s piyopiyo | |
IL_000a: add | |
// スタックに乗っている値を返す | |
IL_0003: ret | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment