[sheepdog] [PATCH] Fix hardcode AMD64 assembly code (RSP)

YunQiang Su wzssyqa at gmail.com
Mon Jul 29 05:32:48 CEST 2013


On Sun, Jul 28, 2013 at 4:39 PM, Hitoshi Mitake
<mitake.hitoshi at gmail.com> wrote:
> At Sun, 28 Jul 2013 02:05:49 +0800,
> YunQiang Su wrote:
>>
>> RSP is a register name only for AMD64 (x86_64) platform,
>> while on other platform it may be another name.
>>
>> On i386 (x86_32) platform, it is "esp".
>> On most of RISC platform (PowerPC, SPARC, MIPS, ARM, etc),
>> it is "sp".
>
> Please add your Signed-off-by tag here. It would be like this:
> Signed-off-by: YunQiang Su <wzssyqa at gmail.com>
>
>> ---
>>  include/logger.h | 23 ++++++++++++++++++++++-
>>  lib/logger.c     |  5 -----
>>  2 files changed, 22 insertions(+), 6 deletions(-)
>>
>> diff --git a/include/logger.h b/include/logger.h
>> index 79eb108..81691b2 100644
>> --- a/include/logger.h
>> +++ b/include/logger.h
>> @@ -38,10 +38,31 @@ void log_write(int prio, const char *func, int line, const char *fmt, ...)
>>  void set_thread_name(const char *name, bool show_idx);
>>  void get_thread_name(char *name);
>>
>> +#ifdef __i386__
>> +#define SP_REG "esp"
>> +#elif defined(__x86_64__)
>> +#define SP_REG "rsp"
>> +#elif defined(__mips__) || defined(__sparc__) || \
>> +      defined (__arm__) || (defined __powerpc__) || \
>> +      defined (__s390__) || (defined __s390x__) || \
>> +      defined (__ia64__)
>> +#define SP_REG "sp"
>> +#endif
>
> sheepdog cannot support ia64. Because sheepdog depends on urcu and
> urcu doesn't support ia64.
>
There is urcu package on debian for ia64
http://packages.debian.org/sid/liburcu1

> I think supporting i386 and arm would be enough. Supporting other
> architectures would be too costly, at least for now.
>
> Thanks,
> Hitoshi



-- 
YunQiang Su



More information about the sheepdog mailing list