Skip to content

Commit

Permalink
IA-16: add assume_ds_data', no_assume_ds_data' func. attribs.
Browse files Browse the repository at this point in the history
This allows one to specify whether each individual function
assumes %ds == .data.

Hopefully this change will make it easier, in the future, to
add support for expressing far callbacks, far IRQ handlers,
etc. (#19).

The test cases and documentation have also been cleaned up
and updated.
  • Loading branch information
tkchia committed Apr 17, 2018
1 parent a39d1d2 commit 4e30c2c
Show file tree
Hide file tree
Showing 14 changed files with 612 additions and 98 deletions.
2 changes: 2 additions & 0 deletions gcc/config/ia16/ia16-c.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ ia16_cpu_cpp_builtins (void)
cpp_define (parse_in, "__IA16_FEATURE_FAR_FUNCTION_SYNTAX");
cpp_define (parse_in, "__IA16_FEATURE_ATTRIBUTE_CDECL");
cpp_define (parse_in, "__IA16_FEATURE_ATTRIBUTE_STDCALL");
cpp_define (parse_in, "__IA16_FEATURE_ATTRIBUTE_ASSUME_DS_DATA");
cpp_define (parse_in, "__IA16_FEATURE_ATTRIBUTE_NO_ASSUME_DS_DATA");

/* Also define a macro to give the function calling convention settings
in use. */
Expand Down
4 changes: 1 addition & 3 deletions gcc/config/ia16/ia16-protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ extern struct gcc_target targetm;
extern unsigned char ia16_hard_regno_nregs[17][FIRST_PSEUDO_REGISTER];
extern enum reg_class const ia16_regno_class[FIRST_PSEUDO_REGISTER];
extern int ia16_regno_in_class_p (unsigned, unsigned);
extern int ia16_far_function_type_p (const_tree funtype);
extern int ia16_in_far_function_p (void);
extern int ia16_far_function_rtx_p (rtx addr);
extern bool ia16_have_seg_override_p (rtx x);
extern HOST_WIDE_INT ia16_first_parm_offset (tree fundecl);
extern HOST_WIDE_INT ia16_initial_frame_pointer_offset (void);
Expand Down Expand Up @@ -62,7 +60,7 @@ extern bool ia16_non_overlapping_mem_p (rtx m1, rtx m2);
#endif

extern void ia16_expand_prologue (void);
extern void ia16_expand_reset_ds_for_call (void);
extern void ia16_expand_reset_ds_for_call (rtx addr);
extern void ia16_expand_epilogue (bool sibcall);
extern const char *
ia16_get_call_expansion (rtx, machine_mode, bool);
Expand Down
Loading

0 comments on commit 4e30c2c

Please sign in to comment.