Changeset 10010


Ignore:
Timestamp:
Jul 12, 2008, 3:19:05 AM (11 years ago)
Author:
gb
Message:

Mostly cosmetic changes (to avoid some gcc warnings at -Wall).
gc-common.c : initialize the fields in a timeval struct, to avoid spurious

warning.

lisp-debug.c : fix typo when printing %rsi value, use %l for nargs.

lisp.h prototype for print_lisp_object()

macros.h : kinder, gentler ptr_to_lispobj(), ptr_from_lispobj(), deref()

macros. (GC seems to miscompile at -low- optimization settings, may
have to do with these macros.)

pmcl-kernel.c : make implicit comparison operands explicit in a few

cases. Use %l when printing paging info.

ppc-constants32.h, ppc-constants64.h, x86-constants64.h: define new

hash-table-vector-header fields, now that we're using them in the
trunk.

thread_manager.c : use signed_natural for futex pointers

x86-gc.c : in mark_root(), use a simpler construct to set a pool's

data to NIL. (This may have been losing under -low- optimization.)

Location:
trunk/source/lisp-kernel
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/gc-common.c

    r9901 r10010  
    13441344    lispsymbol * total_bytes_freed = (lispsymbol *) &(nrs_TOTAL_BYTES_FREED);
    13451345    LispObj val;
    1346     struct timeval *timeinfo, elapsed;
     1346    struct timeval *timeinfo, elapsed = {0, 0};
    13471347
    13481348    val = total_gc_microseconds->vcell;
  • trunk/source/lisp-kernel/lisp-debug.c

    r9907 r10010  
    428428    fprintf(stderr,"------\n");
    429429    if (tag_of(xpGPR(xp,Inargs)) == tag_fixnum) {
    430       fprintf(stderr,"%%rcx (nargs) = %d (maybe)\n", unbox_fixnum(xpGPR(xp,Inargs)&0xffff));
     430      fprintf(stderr,"%%rcx (nargs) = %ld (maybe)\n", unbox_fixnum(xpGPR(xp,Inargs)&0xffff));
    431431    }
    432432#endif
     
    625625  fprintf(stderr,"%%rsp = 0x%016lX      %%r12 = 0x%016lX\n", xpGPR(xp,REG_RSP),xpGPR(xp,REG_R12));
    626626  fprintf(stderr,"%%rbp = 0x%016lX      %%r13 = 0x%016lX\n", xpGPR(xp,REG_RBP),xpGPR(xp,REG_R13));
    627   fprintf(stderr,"%%rsi = 0x%%016lX     %%r14 = 0x%016lX\n", xpGPR(xp,REG_RSI),xpGPR(xp,REG_R14));
     627  fprintf(stderr,"%%rsi = 0x%016lX      %%r14 = 0x%016lX\n", xpGPR(xp,REG_RSI),xpGPR(xp,REG_R14));
    628628  fprintf(stderr,"%%rdi = 0x%016lX      %%r15 = 0x%016lX\n", xpGPR(xp,REG_RDI),xpGPR(xp,REG_R15));
    629629  fprintf(stderr,"%%rip = 0x%016lX   %%rflags = 0x%016lX\n",
  • trunk/source/lisp-kernel/lisp.h

    r8470 r10010  
    6060ensure_stack_limit(size_t);
    6161
     62char *
     63print_lisp_object(LispObj);
     64
    6265#include "kernel-globals.h"
    6366#endif
  • trunk/source/lisp-kernel/macros.h

    r8547 r10010  
    2222#define __macros__
    2323
    24 #define ptr_to_lispobj(p) ((LispObj)((unsigned_of_pointer_size)(p)))
    25 #define ptr_from_lispobj(o) ((LispObj*)((unsigned_of_pointer_size)(o)))
     24#define ptr_to_lispobj(p) ((LispObj)(p))
     25#define ptr_from_lispobj(o) ((LispObj*)(o))
    2626#define lisp_reg_p(reg)  ((reg) >= fn)
    2727
     
    3232#define indirect_node(o) (*(LispObj *)(node_aligned(o)))
    3333
    34 #define deref(o,n) (*((LispObj*) (ptr_from_lispobj(untag((LispObj)o)))+(n)))
     34#define deref(o,n) ((((LispObj*) (untag((LispObj)o))))[(n)])
    3535#define header_of(o) deref(o,0)
    3636
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r9904 r10010  
    532532  BytePtr new_start, new_end;
    533533
    534   a = find_readonly_area();
    535   if (a) {
     534  if ((a = find_readonly_area()) != NULL) {
    536535    if ((a->active + more) > a->high) {
    537536      return NULL;
     
    947946  }
    948947  work = base;
    949   while (c = *work) {
     948  while ((c = *work) != '\0') {
    950949    if (islower(c)) {
    951950      *work++ = toupper(c);
     
    14891488}
    14901489
     1490
    14911491int
    14921492main(int argc, char *argv[], char *envp[], void *aux)
     
    20502050report_paging_info_delta(FILE *out, paging_info *start, paging_info *stop)
    20512051{
    2052   fprintf(out,";;; %d soft faults, %d faults, %d pageins\n\n",
     2052  fprintf(out,";;; %ld soft faults, %ld faults, %ld pageins\n\n",
    20532053          stop->ru_minflt-start->ru_minflt,
    20542054          stop->ru_majflt-start->ru_majflt,
  • trunk/source/lisp-kernel/ppc-constants32.h

    r5649 r10010  
    333333  LispObj cache_key;            /* value of last cached key */
    334334  LispObj cache_value;          /* last cached value */
     335  LispObj size;                 /* number of entries in table */
     336  LispObj size_reciprocal;      /* shifted reciprocal of size */
    335337} hash_table_vector_header;
    336338
  • trunk/source/lisp-kernel/ppc-constants64.h

    r9906 r10010  
    312312  LispObj cache_key;            /* value of last cached key */
    313313  LispObj cache_value;          /* last cached value */
     314  LispObj size;                 /* number of entries in table */
     315  LispObj size_reciprocal;      /* shifted reciprocal of size */
    314316} hash_table_vector_header;
    315317
  • trunk/source/lisp-kernel/thread_manager.c

    r9997 r10010  
    156156
    157157static void inline
    158 lock_futex(natural *p)
     158lock_futex(signed_natural *p)
    159159{
    160160 
     
    173173
    174174static void inline
    175 unlock_futex(natural *p)
     175unlock_futex(signed_natural *p)
    176176{
    177177  if (atomic_decf(p) != FUTEX_AVAIL) {
  • trunk/source/lisp-kernel/x86-constants64.h

    r8547 r10010  
    393393  LispObj cache_key;            /* value of last cached key */
    394394  LispObj cache_value;          /* last cached value */
     395  LispObj size;                 /* number of entries in table */
     396  LispObj size_reciprocal;      /* shifted reciprocal of size */
    395397} hash_table_vector_header;
    396398
  • trunk/source/lisp-kernel/x86-gc.c

    r9901 r10010  
    331331
    332332      if (subtag == subtag_pool) {
    333         deref(ptr_to_lispobj(base), 1) = lisp_nil;
     333        deref(base, 1) = lisp_nil;
    334334      }
    335335     
Note: See TracChangeset for help on using the changeset viewer.