{"id":1150,"date":"2022-08-30T15:13:13","date_gmt":"2022-08-30T15:13:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/x86-64-assembly-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:13:13","modified_gmt":"2022-08-30T15:13:13","slug":"x86-64-assembly-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/x86-64-assembly-collection-of-common-programming-errors\/","title":{"rendered":"x86 64 assembly-Collection of common programming errors"},"content":{"rendered":"<p>I am writing a self modifying code.<\/p>\n<pre><code>movq      $TARGET_CIA, 0x550(%rax)\n<\/code><\/pre>\n<p>This symbol TARGET_CIA is undefined initially and at run time I try to copy a 64 bit immediate value to this location. But at compile time this instruction takes the value of this undefined immediate value as 32 bit and when i try to copy the 64 bits, I see the signed extended 32 bits at its place. Is there a way to get this undefined symbol treated as 64 bit value?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:32:38. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am writing a self modifying code. movq $TARGET_CIA, 0x550(%rax) This symbol TARGET_CIA is undefined initially and at run time I try to copy a 64 bit immediate value to this location. But at compile time this instruction takes the value of this undefined immediate value as 32 bit and when i try to copy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1150","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1150"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1150\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}