以下x86代码之间有什么区别

时间:2020-10-30 20:10:07

标签: assembly gcc x86-64 calling-convention

我有以下C代码:

  public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapMvcAttributeRoutes();
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new[] {
                "Areas.Controllers"
            }
            );
        }

但是,我对x86指令有疑问。对于foo函数,应该

void foo(int *p){
    *p = 5;
}
void test(){
    int p = 0;
    foo (&p);
}

对应于

*p = 5

0 个答案:

没有答案