Annotation of uae/src/md-68k/support.c, revision 1.1.1.1

1.1       root        1:  /* 
                      2:   * UAE - The Un*x Amiga Emulator
                      3:   * 
                      4:   * Miscellaneous machine dependent support functions and definitions
                      5:   *
                      6:   * Copyright 1996 Bernd Schmidt
                      7:   */
                      8: 
                      9: #include "sysconfig.h"
                     10: #include "sysdeps.h"
                     11: 
                     12: #include "config.h"
                     13: #include "options.h"
                     14: #include "machdep/m68k.h"
                     15: 
                     16: struct flag_struct regflags;
                     17: 
                     18: int fast_memcmp(const void *foo, const void *bar, int len)
                     19: {
                     20:        return memcmp(foo, bar, len);
                     21: }
                     22: 
                     23: int memcmpy(void *foo, const void *bar, int len)
                     24: {
                     25:        while ((len -= 4) >= 0)
                     26:                if(*((long*)foo)++ != *((long*)bar)++)
                     27:                        goto diff4;
                     28:        len += 4;
                     29:     
                     30:        while (len--)
                     31:                if (*((char*)foo)++ != *((char*)bar)++) {
                     32:                        ((char*)foo)[-1] = ((char*)bar)[-1];
                     33:                        goto diff1;
                     34:                }
                     35:        return 0;
                     36: 
                     37: diff4:
                     38:        ((long*)foo)[-1] = ((long*)bar)[-1];
                     39:        while ((len -= 4) >= 0)
                     40:                *((long*)foo)++ = *((long*)bar)++;
                     41:        len += 4;
                     42: 
                     43: diff1:
                     44:        while (len--)
                     45:                *((char*)foo)++ = *((char*)bar)++;
                     46:        return 1;
                     47: }
                     48: 
                     49: void machdep_init (void)
                     50: {
                     51: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.