Nishinoyama / nemu

ネムネム
0 stars 0 forks source link

condition 関数のマクロ化 #1

Open Nishinoyama opened 11 months ago

Nishinoyama commented 11 months ago

https://github.com/Nishinoyama/nemu/blob/73ca9b2e8343000f72fcc98e12d33744ca94e68e/src/emulator.rs#L280-L288

これらを下みたいにマクロ化できないか?

define_get_condition(be, CARRY || ZERO);
define_get_condition(l, SIGN != OVERFLOW);
define_get_condition(le, ZERO || SIGN != OVERFLOW);
Nishinoyama commented 1 week ago

時代は†メタプログラミング†、か