Andes Workshop

It is currently Mon Jun 26, 2017 12:47 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 關於__builtin_memcpy
PostPosted: Wed Jul 04, 2012 6:36 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
在我們的demo裡,用到一個function __builtin_memcpy
它出現的例子是這樣子:

#define MEMCPY(des, src, n) __builtin_memcpy ((des), (src), (n))
#define MEMSET(s, c, n) __builtin_memset ((s), (c), (n))

它是一個compiler內建的function,不需要include任何header file。
compiler對它的處理是將memcpy以組合語言展開,
而不是像一般的function執行。(跳出去function再跳回來)
比較像是macro的樣子。


Top
 Profile  
 
 Post subject: Re: 關於__builtin_memcpy
PostPosted: Thu Jul 03, 2014 8:20 pm 
Offline

Joined: Thu Jan 23, 2014 4:18 pm
Posts: 12
請問 __builtin_memcpy 在複製時是以4-byte為單位還是以1-byte為單位?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group