<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sile</author_name>
  <author_url>https://blog.hatena.ne.jp/sile/</author_url>
  <blog_title>sileのブログ</blog_title>
  <blog_url>https://sile.hatenablog.jp/</blog_url>
  <categories>
    <anon>llvm</anon>
  </categories>
  <description>LLVMのアセンブリ言語で構造体のサイズ(その構造体を表現するのに必要なバイト数)を取得する方法。 C言語のsizeof演算子のような構造体(或いは型一般)のサイズを取得する直接的な方法はなさそうだけど、対象となる構造体のポインタの値を利用して算出することが可能。 ;; 整数値のペアを保持する構造体(の型) %PAIR = type {i32, i32} ;; %PAIR型のサイズを取得する ;; 次のC言語の文に対応: int size = (int)((PAIR*)(NULL)+1); %size = i32 ptrtoint (%PAIR* getelementptr (%PAIR* n…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsile.hatenablog.jp%2Fentry%2F20101108%2F1289227062&quot; title=&quot; llvmでsizeof - sileのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-11-08 23:37:42</published>
  <title> llvmでsizeof</title>
  <type>rich</type>
  <url>https://sile.hatenablog.jp/entry/20101108/1289227062</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
