トップ «前の日記(2014-07-05) 最新 次の日記(2014-07-07)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|

2014-07-06 :-)

_ 午前

1000 起床

1130 おひる。ボンゴレビアンコ && コーヒー

IMG_5244

IMG_5246

_ 午後

1200 アニメ消化

1500 散歩

IMG_5253

_

1700 読書

2100 飯。オリジン弁当

_ Gmail を Bekcy! でアクセスするようにしてみた

んだが Becky! が割りとよく刺さるので快適とはあまり言えない。

ref. Becky!でGmail 2段認証でIMAP4メールで送信 - Tacknのつぶやき

_ C のラベルのスコープ

スコープは関数内らしい Scope and Visibility

$ gcc --version
gcc (GCC) 4.8.2
#include <stdio.h>

void func0(void)
{
  goto label1;

label1:
  printf("func0\n");
}

void func1(void)
{
  goto label1;

label1:
  printf("func1\n");
}


int main(int ac, char** av)
{
  func0();
  func1();
}
$ gcc -S label0.c

眺める。そもそも label1 という名前が消えておる。seh_proc が何なのか分からんけど(ググっても分からん) これが関数とラベル(というかアドレス?)を結びつけているのかしら。

  .file  "label0.c"
  .section .rdata,"dr"
.LC0:
  .ascii "func0\0"
  .text
  .globl  func0
  .def  func0;  .scl  2;  .type  32;  .endef
  .seh_proc  func0
func0:
  pushq  %rbp
  .seh_pushreg  %rbp
  movq  %rsp, %rbp
  .seh_setframe  %rbp, 0
  subq  $32, %rsp
  .seh_stackalloc  32
  .seh_endprologue
  nop
.L2:
  leaq  .LC0(%rip), %rcx       <= .LOC0 のアドレスを rcx へロードして
  call  puts                   <= puts を呼び出す
  nop
  addq  $32, %rsp
  popq  %rbp
  ret
  .seh_endproc
  .section .rdata,"dr"
.LC1:
  .ascii "func1\0"
  .text
  .globl  func1
  .def  func1;  .scl  2;  .type  32;  .endef
  .seh_proc  func1
func1:
  pushq  %rbp
  .seh_pushreg  %rbp
  movq  %rsp, %rbp
  .seh_setframe  %rbp, 0
  subq  $32, %rsp
  .seh_stackalloc  32
  .seh_endprologue
  nop
.L4:
  leaq  .LC1(%rip), %rcx
  call  puts
  nop
  addq  $32, %rsp
  popq  %rbp
  ret
  .seh_endproc
  .def  __main;  .scl  2;  .type  32;  .endef
  .globl  main
  .def  main;  .scl  2;  .type  32;  .endef
  .seh_proc  main
main:
  pushq  %rbp
  .seh_pushreg  %rbp
  movq  %rsp, %rbp
  .seh_setframe  %rbp, 0
  subq  $32, %rsp
  .seh_stackalloc  32
  .seh_endprologue
  movl  %ecx, 16(%rbp)
  movq  %rdx, 24(%rbp)
  call  __main
  call  func0
  call  func1
  addq  $32, %rsp
  popq  %rbp
  ret
  .seh_endproc
  .ident  "GCC: (GNU) 4.8.2"
  .def  puts;  .scl  2;  .type  32;  .endef