Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6a29775bf089
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 98bb570aec7f
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 28, 2015

  1. LLVMIRGenerator: fix syscall emission.

    whitequark committed Aug 28, 2015
    Copy the full SHA
    9fd25a1 View commit details
  2. log.c: fix warnings.

    whitequark committed Aug 28, 2015
    Copy the full SHA
    30cdb20 View commit details
  3. log.c: fix off-by-one error.

    whitequark committed Aug 28, 2015
    Copy the full SHA
    98bb570 View commit details
Showing with 12 additions and 8 deletions.
  1. +7 −4 artiq/compiler/transforms/llvm_ir_generator.py
  2. +1 −1 artiq/frontend/artiq_coretool.py
  3. +3 −2 soc/runtime/log.c
  4. +1 −1 soc/runtime/log.h
11 changes: 7 additions & 4 deletions artiq/compiler/transforms/llvm_ir_generator.py
Original file line number Diff line number Diff line change
@@ -793,10 +793,13 @@ def _prepare_closure_call(self, insn):

def _prepare_ffi_call(self, insn):
llargs = [self.map(arg) for arg in insn.arguments()]
llfunty = ll.FunctionType(self.llty_of_type(insn.type, for_return=True),
[llarg.type for llarg in llargs])
llfun = ll.Function(self.llmodule, llfunty,
insn.target_function().type.name)
llfunname = insn.target_function().type.name
llfun = self.llmodule.get_global(llfunname)
if llfun is None:
llfunty = ll.FunctionType(self.llty_of_type(insn.type, for_return=True),
[llarg.type for llarg in llargs])
llfun = ll.Function(self.llmodule, llfunty,
insn.target_function().type.name)
return llfun, list(llargs)

# See session.c:{send,receive}_rpc_value and comm_generic.py:_{send,receive}_rpc_value.
2 changes: 1 addition & 1 deletion artiq/frontend/artiq_coretool.py
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ def main():
comm.check_ident()

if args.action == "log":
print(comm.get_log())
print(comm.get_log(), end='')
elif args.action == "cfg-read":
value = comm.flash_storage_read(args.key)
if not value:
5 changes: 3 additions & 2 deletions soc/runtime/log.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <console.h>

#include <generated/csr.h>
@@ -55,8 +56,8 @@ void log_get(char *outbuf)
{
int i, j;

j = buffer_index + 1;
for(i=0;i<LOG_BUFFER_SIZE;i++) {
j = buffer_index;
for(i = 0; i < LOG_BUFFER_SIZE; i++) {
outbuf[i] = buffer[j];
j = (j + 1) % LOG_BUFFER_SIZE;
}
2 changes: 1 addition & 1 deletion soc/runtime/log.h
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@ void log_va(const char *fmt, va_list args);
void log(const char *fmt, ...);

void log_get(char *outbuf);
void log_clear();
void log_clear(void);

#endif /* __LOG_H */